[gnumeric] GUI: Fix crash on exit related to split panes.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Fix crash on exit related to split panes.
- Date: Tue, 27 May 2014 22:38:44 +0000 (UTC)
commit 4fec2df7dfd77330b8f19b295a93df92bcfc2396
Author: Morten Welinder <terra gnome org>
Date: Tue May 27 18:38:11 2014 -0400
GUI: Fix crash on exit related to split panes.
ChangeLog | 6 ++++++
NEWS | 1 +
src/gnm-pane.c | 9 +++++++--
3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index db73ee4..4869f16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-05-27 Morten Welinder <terra gnome org>
+
+ * src/gnm-pane.c (gnm_pane_header_init): Hold references to
+ col/row canvas. Fixes #730857.
+ (gnm_pane_dispose): Release references.
+
2014-05-23 Morten Welinder <terra gnome org>
* configure.ac: Post-release bump.
diff --git a/NEWS b/NEWS
index ad62193..10ec133 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Gnumeric 1.12.17
Morten:
* Fix UMR. [#730727]
+ * Fix crash on exit. [#730857]
--------------------------------------------------------------------------
Gnumeric 1.12.16
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index 8c0f7f0..3a4498a 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -851,11 +851,13 @@ gnm_pane_dispose (GObject *obj)
if (pane->col.canvas != NULL) {
gtk_widget_destroy (GTK_WIDGET (pane->col.canvas));
+ g_object_unref (pane->col.canvas);
pane->col.canvas = NULL;
}
if (pane->row.canvas != NULL) {
gtk_widget_destroy (GTK_WIDGET (pane->row.canvas));
+ g_object_unref (pane->row.canvas);
pane->row.canvas = NULL;
}
@@ -1044,6 +1046,9 @@ gnm_pane_class_init (GnmPaneClass *klass)
GSF_CLASS (GnmPane, gnm_pane,
gnm_pane_class_init, gnm_pane_init,
GNM_SIMPLE_CANVAS_TYPE)
+#if 0
+;
+#endif
static void
gnm_pane_header_init (GnmPane *pane, SheetControlGUI *scg,
@@ -1063,10 +1068,10 @@ gnm_pane_header_init (GnmPane *pane, SheetControlGUI *scg,
if (is_col_header) {
if (sheet && sheet->text_is_rtl)
goc_canvas_set_direction (canvas, GOC_DIRECTION_RTL);
- pane->col.canvas = canvas;
+ pane->col.canvas = g_object_ref_sink (canvas);
pane->col.item = GNM_ITEM_BAR (item);
} else {
- pane->row.canvas = canvas;
+ pane->row.canvas = g_object_ref_sink (canvas);
pane->row.item = GNM_ITEM_BAR (item);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]