X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fplugins%2Felev.c;h=d8ffc009e338c8d084352e85d902832cf993e831;hp=2a61cde9df10ed7074489a2f5b328230f92e6a50;hb=aa0783b3ce8ab7dd72560b7327600c2b36a8b391;hpb=e5da3e49e161851790d35bc8b7267424dea73973 diff --git a/src/plugins/elev.c b/src/plugins/elev.c index 2a61cde..d8ffc00 100644 --- a/src/plugins/elev.c +++ b/src/plugins/elev.c @@ -204,6 +204,7 @@ static void _load_tile(GisTile *tile, gpointer _self) load->data->bil = _load_bil(load->path); if (!load->data->bil) { g_remove(load->path); + g_free(load->data); g_free(load->path); g_free(load); return; @@ -230,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)