$OpenBSD: patch-kttsd_plugins_festivalint_festivalintproc_cpp,v 1.1 2005/04/04 16:08:16 espie Exp $
--- kttsd/plugins/festivalint/festivalintproc.cpp.orig	Mon Apr  4 17:46:47 2005
+++ kttsd/plugins/festivalint/festivalintproc.cpp	Mon Apr  4 18:00:53 2005
@@ -479,19 +479,24 @@ void FestivalIntProc::slotReceivedStdout
     {
         // Look for opening ( and closing ).
         buf.simplifyWhiteSpace();
-        if (buf.left(1) == "(")
-        {
-            int rightParen = buf.find(')');
-            if (rightParen > 0)
-            {
-                m_waitingQueryVoices = false;
-                // Extract contents between parens.
-                buf = buf.mid(1, rightParen - 1);
-                // Space separated list.
-                voiceCodesList = QStringList::split(" ", buf, false);
-                emitQueryVoicesFinished = true;
-            }
-        }
+		if (buf.left(3) == "nil") {
+			emitQueryVoicesFinished = true;
+			m_waitingQueryVoices = false;
+		} else {
+			if (buf.left(1) == "(")
+			{
+				int rightParen = buf.find(')');
+				if (rightParen > 0)
+				{
+					m_waitingQueryVoices = false;
+					// Extract contents between parens.
+					buf = buf.mid(1, rightParen - 1);
+					// Space separated list.
+					voiceCodesList = QStringList::split(" ", buf, false);
+					emitQueryVoicesFinished = true;
+				}
+			}
+		}
     }
     if (promptSeen)
     {
