diff options
Diffstat (limited to 'navit/speech/cmdline/speech_cmdline.c')
-rw-r--r-- | navit/speech/cmdline/speech_cmdline.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/navit/speech/cmdline/speech_cmdline.c b/navit/speech/cmdline/speech_cmdline.c index 08a1abe03..49252f346 100644 --- a/navit/speech/cmdline/speech_cmdline.c +++ b/navit/speech/cmdline/speech_cmdline.c @@ -236,6 +236,10 @@ speechd_new(struct speech_methods *meth, struct attr **attrs, struct attr *paren this->flags=attr->u.num; if (this->sample_dir && this->sample_suffix) { void *handle=file_opendir(this->sample_dir); + if (!handle) { + dbg(lvl_error,"Cannot read sample directory contents: %s", this->sample_dir); + return NULL; + } char *name; int suffix_len=strlen(this->sample_suffix); while((name=file_readdir(handle))) { |