[gnumeric] GUI: fix critical.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: fix critical.
- Date: Thu, 17 Jun 2010 15:19:28 +0000 (UTC)
commit b40020aeb62e9e11679c5e36dcda59b1fad7e12f
Author: Morten Welinder <terra gnome org>
Date: Thu Jun 17 11:19:12 2010 -0400
GUI: fix critical.
src/gui-file.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/gui-file.c b/src/gui-file.c
index 75fceba..ccd9f7b 100644
--- a/src/gui-file.c
+++ b/src/gui-file.c
@@ -598,9 +598,17 @@ gui_file_save (WBCGtk *wbcg, WorkbookView *wb_view)
if (wb->file_format_level < GO_FILE_FL_AUTO)
return gui_file_save_as (wbcg, wb_view);
else {
- gboolean ok = wb_view_save (wb_view, GO_CMD_CONTEXT (wbcg));
+ gboolean ok;
+
+ /* We need a ref because a Ctrl-Q at the wrong time will
+ cause the workbook to disappear at the end of the
+ save. */
+ g_object_ref (wb);
+
+ ok = wb_view_save (wb_view, GO_CMD_CONTEXT (wbcg));
if (ok)
workbook_update_history (wb);
+ g_object_unref (wb);
return ok;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]