summaryrefslogtreecommitdiff
path: root/navit/osd
diff options
context:
space:
mode:
authortegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-09-08 06:27:42 +0000
committertegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-09-08 06:27:42 +0000
commit6d6ba0d407c46065393eb8065976852ab9626ded (patch)
treeb711035b65c1792f791150b2a88f33e06c4abf6d /navit/osd
parent390c77294ddeea2a2334085e8a0533ccd986db55 (diff)
downloadnavit-svn-6d6ba0d407c46065393eb8065976852ab9626ded.tar.gz
add:osd/core:added some NULL checks
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4772 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/osd')
-rw-r--r--navit/osd/core/osd_core.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/navit/osd/core/osd_core.c b/navit/osd/core/osd_core.c
index e2778cce..b10bc629 100644
--- a/navit/osd/core/osd_core.c
+++ b/navit/osd/core/osd_core.c
@@ -222,28 +222,38 @@ int set_std_osd_attr(struct osd_priv_common*opc, struct attr*the_attr)
if(opc && the_attr && ATTR_IS_INT(the_attr->type)) {
if(attr_w == the_attr->type) {
opc->osd_item.w = the_attr->u.num;
- osd_std_resize(&opc->osd_item);
- return 1;
+ if(opc->osd_item.gr) {
+ osd_std_resize(&opc->osd_item);
+ return 1;
+ }
}
else if(attr_h == the_attr->type) {
opc->osd_item.h = the_attr->u.num;
- osd_std_resize(&opc->osd_item);
- return 1;
+ if(opc->osd_item.gr) {
+ osd_std_resize(&opc->osd_item);
+ return 1;
+ }
}
else if(attr_x == the_attr->type) {
opc->osd_item.p.x = the_attr->u.num;
- osd_std_resize(&opc->osd_item);
- return 1;
+ if(opc->osd_item.gr) {
+ osd_std_resize(&opc->osd_item);
+ return 1;
+ }
}
else if(attr_y == the_attr->type) {
opc->osd_item.p.y = the_attr->u.num;
- osd_std_resize(&opc->osd_item);
- return 1;
+ if(opc->osd_item.gr) {
+ osd_std_resize(&opc->osd_item);
+ return 1;
+ }
}
else if(attr_font_size == the_attr->type) {
opc->osd_item.font_size = the_attr->u.num;
- osd_std_resize(&opc->osd_item);
- return 1;
+ if(opc->osd_item.gr) {
+ osd_std_resize(&opc->osd_item);
+ return 1;
+ }
}
}
if(opc->spec_set_attr_func) {