Commit ba4c9b10 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

always unref self->file, not only when the file existed.

2008-07-21  Sven Neumann  <sven@gimp.org>

	* gegl/buffer/gegl-tile-backend-file.c (finalize): always unref
	self->file, not only when the file existed.


svn path=/trunk/; revision=2534
parent 5f8fe2a2
2008-07-21 Sven Neumann <sven@gimp.org>
* gegl/buffer/gegl-tile-backend-file.c (finalize): always unref
self->file, not only when the file existed.
2008-07-21 Sven Neumann <sven@gimp.org>
* gegl/buffer/gegl-tile-storage.c (gegl_tile_storage_finalize):
......
......@@ -677,17 +677,14 @@ finalize (GObject *object)
g_object_unref (self->o);
if (self->file)
{
g_file_delete (self->file, NULL, NULL);
g_object_unref (self->file);
}
g_file_delete (self->file, NULL, NULL);
#else
if (self->i != -1)
if (self->i != -1)
{
close (self->i);
self->i = -1;
}
if (self->o != -1)
if (self->o != -1)
{
close (self->o);
self->o = -1;
......@@ -701,6 +698,9 @@ finalize (GObject *object)
#if HAVE_GIO
if (self->monitor)
g_object_unref (self->monitor);
if (self->file)
g_object_unref (self->file);
#endif
(*G_OBJECT_CLASS (parent_class)->finalize)(object);
......@@ -1011,7 +1011,7 @@ ensure_exist (GeglTileBackendFile *self)
g_assert (self->o);
#else
g_assert (self->i != -1);
g_assert (self->o != -1);
g_assert (self->o != -1);
#endif
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment