From 9c19cbe8ebdc10a32105a30aa5aa88c3a730c750 Mon Sep 17 00:00:00 2001 From: mdankov Date: Mon, 28 May 2012 15:40:44 +0000 Subject: [PATCH] Fix:core:Try to fix n800 build again. git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5115 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/graphics.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/navit/navit/graphics.c b/navit/navit/graphics.c index 71fe28f..b626962 100644 --- a/navit/navit/graphics.c +++ b/navit/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); } -- 2.7.4