diff options
author | bjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-06-30 16:11:10 +0000 |
---|---|---|
committer | bjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-06-30 16:11:10 +0000 |
commit | 87cc37f17abdcf3fb107cea31dc2e4d89f8c6b65 (patch) | |
tree | 4a54a1b803df25700b8f985f63323d93b12884a3 /navit/osd | |
parent | 6281f717c28819e5c269e2cece3c6acb530fcf45 (diff) | |
download | navit-svn-87cc37f17abdcf3fb107cea31dc2e4d89f8c6b65.tar.gz |
fixed logic to ensure attr.u.num is initialised
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5164 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/osd')
-rw-r--r-- | navit/osd/core/osd_core.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c index 78a770c1..35cdbbd5 100644 --- a/navit/osd/core/osd_core.c +++ b/navit/osd/core/osd_core.c @@ -1835,9 +1835,8 @@ osd_nav_toggle_announcer_draw(struct osd_priv_common *opc, struct navit *navit, if (this->last_state == -1) { - if (!navit_get_attr(navit, attr_speech, &speechattr, NULL)) - if (!speech_get_attr(speechattr.u.speech, attr_active, &attr, NULL)) - attr.u.num = 1; + if (!navit_get_attr(navit, attr_speech, &speechattr, NULL) || !speech_get_attr(speechattr.u.speech, attr_active, &attr, NULL)) + attr.u.num = 1; this->active = attr.u.num; } else this->active = !this->active; |