diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/Map.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/Map.c b/generic/Map.c index b4d44eb..db3c5b5 100644 --- a/generic/Map.c +++ b/generic/Map.c @@ -219,7 +219,7 @@ Init(Item item, map->tfi = ZnGetTexFont(wi, map->text_font); #endif - map->map_info_name = ""; + map->map_info_name = NULL; map->map_info = NULL; map->vectors = NULL; @@ -290,7 +290,7 @@ Clone(Item item) map->texts = ZnListDuplicate(map->texts); } - if (strlen(map->map_info_name) != 0) { + if (map->map_info_name) { char *text; text = ZnMalloc((strlen(map->map_info_name) + 1) * sizeof(char)); strcpy(text, map->map_info_name); @@ -358,7 +358,7 @@ Destroy(Item item) } ZnListFree(map->symbol_patterns); } - if (strlen(map->map_info_name) != 0) { + if (map->map_info_name) { ZnFree(map->map_info_name); } if (map->map_info != NULL) { @@ -405,7 +405,7 @@ Configure(Item item, MapInfoId map_info; ZnBool error = False; - if (strlen(map->map_info_name) != 0) { + if (map->map_info_name) { map_info = ZnGetMapInfo(wi->interp, map->map_info_name, UpdateMapInfo, (ClientData) map); if (!map_info) { |