[evolution/wip/webkit2] Bug 769288 - Crash after saving view and changing folder
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 769288 - Crash after saving view and changing folder
- Date: Wed, 10 Aug 2016 13:47:56 +0000 (UTC)
commit 1b3e3509b876b004e1e328060298561a7fdcd726
Author: Milan Crha <mcrha redhat com>
Date: Fri Aug 5 12:50:17 2016 +0200
Bug 769288 - Crash after saving view and changing folder
e-util/gal-view-instance-save-as-dialog.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/e-util/gal-view-instance-save-as-dialog.c b/e-util/gal-view-instance-save-as-dialog.c
index c29d719..361fdd3 100644
--- a/e-util/gal-view-instance-save-as-dialog.c
+++ b/e-util/gal-view-instance-save-as-dialog.c
@@ -23,12 +23,12 @@
#include <config.h>
#endif
-#include "gal-view-instance-save-as-dialog.h"
-
#include <glib/gi18n.h>
#include "e-misc-utils.h"
#include "e-util-private.h"
+#include "gal-view-etable.h"
+#include "gal-view-instance-save-as-dialog.h"
G_DEFINE_TYPE (GalViewInstanceSaveAsDialog, gal_view_instance_save_as_dialog, GTK_TYPE_DIALOG)
@@ -326,6 +326,7 @@ gal_view_instance_save_as_dialog_save (GalViewInstanceSaveAsDialog *dialog)
view_count = gal_view_collection_get_count (collection);
view = gal_view_clone (view);
+
switch (dialog->toggle) {
case GAL_VIEW_INSTANCE_SAVE_AS_DIALOG_TOGGLE_REPLACE:
if (dialog->treeview) {
@@ -359,7 +360,14 @@ gal_view_instance_save_as_dialog_save (GalViewInstanceSaveAsDialog *dialog)
break;
}
+ /* The view stored in the collection should not be left attached, but detach it
+ only after it's saved, to have data to save. */
+ if (GAL_IS_VIEW_ETABLE (view))
+ gal_view_etable_detach (GAL_VIEW_ETABLE (view));
+
if (id) {
gal_view_instance_set_current_view_id (dialog->instance, id);
}
+
+ g_clear_object (&view);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]