festival: fix voice validity/NULL-check thinko.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 6 Nov 2014 14:54:07 +0000 (16:54 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 6 Nov 2014 14:54:07 +0000 (16:54 +0200)
src/plugins/text-to-speech/festival/libcarnival.cc

index 0d899bd..cce484f 100644 (file)
@@ -372,7 +372,7 @@ int carnival_select_voice(const char *name)
     LISP     lf, lr;
     int      r;
 
-    if ((v = find_voice_entry(name)) == NULL && v->language == NULL) {
+    if ((v = find_voice_entry(name)) == NULL || v->language == NULL) {
         errno = ENOENT;
 
         return -1;                       /* not loaded, cannot select */