mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-02 14:04:27 +00:00
new_translator may be NULL when processing the charset command [clang scan-build]
This commit is contained in:
@@ -801,8 +801,12 @@ voice_t *LoadVoice(const char *vname, int control)
|
||||
&langopts->unstressed_wd2);
|
||||
break;
|
||||
case V_CHARSET:
|
||||
if ((sscanf(p, "%d", &value) == 1) && (value < N_CHARSETS))
|
||||
new_translator->charset_a0 = charsets[value];
|
||||
if ((sscanf(p, "%d", &value) == 1) && (value < N_CHARSETS)) {
|
||||
if (new_translator != NULL)
|
||||
new_translator->charset_a0 = charsets[value];
|
||||
else
|
||||
fprintf(stderr, "The charset attribute is specified before language.\n");
|
||||
}
|
||||
break;
|
||||
case V_OPTION:
|
||||
value2 = 0;
|
||||
|
||||
Reference in New Issue
Block a user