Misc pointer fixes
authorAndy Spencer <andy753421@gmail.com>
Sat, 6 Feb 2010 15:08:06 +0000 (15:08 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 6 Feb 2010 15:08:50 +0000 (15:08 +0000)
TODO
src/plugins/elev.c
src/plugins/map.c

diff --git a/TODO b/TODO
index 3011499..0225ffd 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,7 +9,6 @@ GisObject:
   - Add min/max LOD
 
 GisTile:
-  - Crashes in GisTile updating
   - Prioritize tile updates
   - Only updates visible tiles
   - Render correct tile resolution when zooming out
index 0783811..d8ffc00 100644 (file)
@@ -231,7 +231,8 @@ static void _free_tile(GisTile *tile, gpointer _self)
 {
        GisPluginElev *self = _self;
        g_debug("GisPluginElev: _free_tile: %p", tile->data);
-       g_idle_add_full(G_PRIORITY_LOW, _free_tile_cb, tile->data, NULL);
+       if (tile->data)
+               g_idle_add_full(G_PRIORITY_LOW, _free_tile_cb, tile->data, NULL);
 }
 
 static gpointer _update_tiles(gpointer _self)
index 92cd376..cdc6f24 100644 (file)
@@ -118,7 +118,7 @@ static gboolean _free_tile_cb(gpointer data)
 static void _free_tile(GisTile *tile, gpointer _self)
 {
        GisPluginMap *self = _self;
-       g_debug("GisPluginMap: _free_tile: %p=%d", tile->data, *(guint*)tile->data);
+       g_debug("GisPluginMap: _free_tile: %p", tile->data);
        g_idle_add_full(G_PRIORITY_LOW, _free_tile_cb, tile->data, NULL);
 }