diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-05-30 04:34:00 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-05-30 04:34:00 +0000 |
commit | dbe3ec2f7493592a6884c597638ce98c4fbdb1fe (patch) | |
tree | da3639c1c2f466badadc87cd40f70f434383a87f /navit/osd | |
parent | e366eb524c46d5d2ae0f8a7c8550a1774c1db825 (diff) | |
download | navit-dbe3ec2f7493592a6884c597638ce98c4fbdb1fe.tar.gz |
Fix:osd_core:msvc compatibility
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4505 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/osd')
-rw-r--r-- | navit/osd/core/osd_core.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c index ce8209c9a..836798472 100644 --- a/navit/osd/core/osd_core.c +++ b/navit/osd/core/osd_core.c @@ -241,6 +241,7 @@ osd_cmd_osd_set_attr(struct navit *this, char *function, struct attr **in, struc in[2] && ATTR_IS_STRING(in[2]->type) && in[2]->u.str //attr_value str ) { struct attr attr_to_set; + struct osd* osd; if(ATTR_IS_STRING(attr_from_name(in[1]->u.str))) { attr_to_set.u.str = in[2]->u.str; @@ -256,7 +257,6 @@ osd_cmd_osd_set_attr(struct navit *this, char *function, struct attr **in, struc attr_to_set.u.numd = val; attr_to_set.type = attr_from_name(in[1]->u.str); } - struct osd* osd; osd = osd_get_osd_by_name(in[0]->u.str); if(osd) { osd_set_attr(osd, &attr_to_set); @@ -1184,14 +1184,16 @@ osd_button_set_attr(struct osd_button *this_, struct attr* attr) return 0; } if(attr->type == attr_src) { + struct navit *nav; + struct graphics *gra; if(this_->src) { g_free(this_->src); } if(attr->u.str) { this_->src = graphics_icon_path(attr->u.str); } - struct navit* nav = this_->item.navit; - struct graphics *gra = navit_get_graphics(nav); + nav = this_->item.navit; + gra = navit_get_graphics(nav); this_->img = graphics_image_new(gra, this_->src); if (!this_->img) { dbg(1, "failed to load '%s'\n", this_->src); |