OSDN Git Service
(root)
/
android-x86
/
external-srec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89837f8
)
Fix crash in voice recognizer when it fails to load the acoustic model
author
Marco Nelissen
<marcone@google.com>
Tue, 22 Sep 2009 23:48:43 +0000
(16:48 -0700)
committer
Marco Nelissen
<marcone@google.com>
Tue, 22 Sep 2009 23:48:43 +0000
(16:48 -0700)
srec/ca/acc_basi.c
patch
|
blob
|
history
diff --git
a/srec/ca/acc_basi.c
b/srec/ca/acc_basi.c
index
b3be53e
..
4cc89a5
100644
(file)
--- a/
srec/ca/acc_basi.c
+++ b/
srec/ca/acc_basi.c
@@
-75,6
+75,11
@@
int CA_LoadAcousticSub(CA_Acoustic *hAcoust, char *subname, CA_AcoustInputParams
{
/* SpeechWorks image format! */
hAcoust->swimodel = load_swimodel(subname);
+ if (hAcoust->swimodel == NULL)
+ {
+ // failed to load, load_swimodel will have printed an error to the log
+ return 0;
+ }
hAcoust->is_loaded = ESR_TRUE;
return 1;
}