Bug 1197455 - Call ps_set_search() only after successful grammar compilation. r=anatal

This commit is contained in:
Kelly Davis 2015-08-22 10:08:00 -04:00
parent a80d736abe
commit 273696f653

View File

@ -277,11 +277,11 @@ PocketSphinxSpeechRecognitionService::ValidateAndSetGrammarList(
int result = ps_set_jsgf_string(mPSHandle, "name",
NS_ConvertUTF16toUTF8(grammar).get());
ps_set_search(mPSHandle, "name");
if (result != 0) {
ISGrammarCompiled = false;
} else {
ps_set_search(mPSHandle, "name");
ISGrammarCompiled = true;
}
} else {