[virt-tools-list] [virt-viewer 1/5] Chain up to parent's dispose at the end of VirtViewerWindow::dispose
Christophe Fergeau
cfergeau at redhat.com
Thu Jun 26 19:41:30 UTC 2014
glib documentation says this should be the last thing done in the
dispose() call, which makes sense as this could invalidate still-needed
data in the parent object.
---
src/virt-viewer-window.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index bb23efe..1ea6c75 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -163,8 +163,6 @@ virt_viewer_window_dispose (GObject *object)
VirtViewerWindowPrivate *priv = VIRT_VIEWER_WINDOW(object)->priv;
GSList *it;
- G_OBJECT_CLASS (virt_viewer_window_parent_class)->dispose (object);
-
if (priv->display) {
g_object_unref(priv->display);
priv->display = NULL;
@@ -192,6 +190,8 @@ virt_viewer_window_dispose (GObject *object)
g_value_unset(&priv->accel_setting);
g_clear_object(&priv->toolbar);
+
+ G_OBJECT_CLASS (virt_viewer_window_parent_class)->dispose (object);
}
static void
--
1.9.3
More information about the virt-tools-list
mailing list