[libdazzle] graph: drop surface in destroy
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] graph: drop surface in destroy
- Date: Thu, 14 Jun 2018 23:33:11 +0000 (UTC)
commit 22f3cb560668563ac1f972f88067506dbee6217e
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 14 16:10:12 2018 -0700
graph: drop surface in destroy
It's a better idea to drop this before we're in finalizer stage.
src/graphing/dzl-graph-view.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/graphing/dzl-graph-view.c b/src/graphing/dzl-graph-view.c
index 43f92d9..a83ce17 100644
--- a/src/graphing/dzl-graph-view.c
+++ b/src/graphing/dzl-graph-view.c
@@ -301,6 +301,8 @@ dzl_graph_view_destroy (GtkWidget *widget)
priv->tick_handler = 0;
}
+ g_clear_pointer (&priv->surface, cairo_surface_destroy);
+
GTK_WIDGET_CLASS (dzl_graph_view_parent_class)->destroy (widget);
}
@@ -312,7 +314,6 @@ dzl_graph_view_finalize (GObject *object)
g_clear_object (&priv->model);
g_clear_object (&priv->model_signals);
- g_clear_pointer (&priv->surface, cairo_surface_destroy);
g_clear_pointer (&priv->renderers, g_ptr_array_unref);
G_OBJECT_CLASS (dzl_graph_view_parent_class)->finalize (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]