GisPluginElev *self = _self;
struct _LoadTileData *load = g_new0(struct _LoadTileData, 1);
- load->path = gis_wms_make_local(self->wms, tile);
+ load->path = gis_wms_fetch(self->wms, tile, GIS_ONCE, NULL, NULL);
g_debug("GisPluginElev: _load_tile: %s", load->path);
load->self = self;
load->tile = tile;
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;
{
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)