summaryrefslogtreecommitdiff
path: root/navit/graphics.c
diff options
context:
space:
mode:
authormdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-05-28 15:40:44 +0000
committermdankov <mdankov@ffa7fe5e-494d-0410-b361-a75ebd5db220>2012-05-28 15:40:44 +0000
commit4ad1180b4b8058d97da5373fb700cd5683f9c569 (patch)
treea75fe379279b49b135426e0c39bcb1df08c50949 /navit/graphics.c
parenta134026a7fc556bdf500124e0c0bcd9a20e4351a (diff)
downloadnavit-svn-4ad1180b4b8058d97da5373fb700cd5683f9c569.tar.gz
Fix:core:Try to fix n800 build again.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5115 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/graphics.c')
-rw-r--r--navit/graphics.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/navit/graphics.c b/navit/graphics.c
index 71fe28fa..b626962c 100644
--- a/navit/graphics.c
+++ b/navit/graphics.c
@@ -408,20 +408,19 @@ void graphics_free(struct graphics *gra)
/* If it's not an overlay, free the image cache. */
if(!gra->parent) {
- GHashTableIter iter;
- char *key;
struct graphics_image *img;
- GList *l;
+ GList *ll, *l;
/* We can't specify context (pointer to struct graphics) for g_hash_table_new to have it passed to free function
so we have to free img->priv manually, the rest would be freed by g_hash_table_destroy. GHashTableIter isn't used because it
broke n800 build at r5107.
*/
- for(l=g_hash_table_get_values(gra->image_cache_hash);l;l=g_list_next(l)) {
+ for(ll=l=g_hash_to_list(gra->image_cache_hash);l;l=g_list_next(l)) {
img=l->data;
if (img && gra->meth.image_free)
gra->meth.image_free(gra->priv, img->priv);
}
+ g_list_free(ll);
g_hash_table_destroy(gra->image_cache_hash);
}