[librsvg] Make RsvgHandle:dispose safe to be called multiple times
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Make RsvgHandle:dispose safe to be called multiple times
- Date: Mon, 7 Nov 2011 19:25:51 +0000 (UTC)
commit ddbb72cbeebd597a7bf143a6ba7bc448feac3372
Author: Christian Persch <chpe gnome org>
Date: Wed Sep 7 12:24:21 2011 +0200
Make RsvgHandle:dispose safe to be called multiple times
rsvg-gobject.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/rsvg-gobject.c b/rsvg-gobject.c
index eaea0cd..3b158a5 100644
--- a/rsvg-gobject.c
+++ b/rsvg-gobject.c
@@ -116,6 +116,9 @@ instance_dispose (GObject * instance)
{
RsvgHandle *self = (RsvgHandle *) instance;
+ if (self->priv->is_disposed)
+ goto chain;
+
self->priv->is_disposed = TRUE;
g_hash_table_foreach (self->priv->entities, rsvg_ctx_free_helper, NULL);
@@ -151,6 +154,7 @@ instance_dispose (GObject * instance)
}
#endif
+ chain:
rsvg_parent_class->dispose (instance);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]