GisTile: use g_object_unref instead of g_free
authorAndy Spencer <andy753421@gmail.com>
Sat, 6 Feb 2010 14:55:54 +0000 (14:55 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 6 Feb 2010 14:55:54 +0000 (14:55 +0000)
src/gis-opengl.c
src/objects/gis-tile.c
src/plugins/elev.c

index d85b70b..65821d7 100644 (file)
@@ -394,6 +394,7 @@ static gboolean on_expose(GisOpenGL *self, GdkEventExpose *event, gpointer _)
 #else
        g_tree_foreach(self->objects, _draw_level, self);
        if (self->wireframe) {
+               glClear(GL_DEPTH_BUFFER_BIT);
                glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
                roam_sphere_draw(self->sphere);
        }
index 2fe7202..14430f4 100644 (file)
@@ -173,7 +173,7 @@ GisTile *gis_tile_gc(GisTile *self, time_t atime,
        //              self, (guint)self->atime, (guint)atime);
        if (!has_children && self->atime < atime && self->data) {
                free_func(self, user_data);
-               g_free(self);
+               g_object_unref(self);
                return NULL;
        }
        return self;
index 2a61cde..0783811 100644 (file)
@@ -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;