From 6f87ada70dbeae71e3428ee3a63f79b8c918f121 Mon Sep 17 00:00:00 2001 From: Yash Singh Date: Fri, 10 Mar 2017 17:58:52 +0530 Subject: [PATCH] window: set edit dialog's event to NULL after saving Earlier the app used to crash when a new event was added using the 'Edit Details' buttion/dialog. This was happening because edit dialog's event was set to NULL before the event was being stored in the calendar through the 'edit_dialog' and hence the app was crashing. This patch fixes the above-mentioned issue by saving the event before setting the edit dialog's event to NULL. https://bugzilla.gnome.org/show_bug.cgi?id=779733 --- src/gcal-window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gcal-window.c b/src/gcal-window.c index 263be518..b44af8f1 100644 --- a/src/gcal-window.c +++ b/src/gcal-window.c @@ -1135,7 +1135,6 @@ edit_dialog_closed (GtkDialog *dialog, event = gcal_edit_dialog_get_event (edit_dialog); view = GCAL_VIEW (window->views[window->active_view]); - gcal_edit_dialog_set_event (edit_dialog, NULL); gtk_widget_hide (GTK_WIDGET (dialog)); switch (response) @@ -1182,6 +1181,8 @@ edit_dialog_closed (GtkDialog *dialog, break; } + + gcal_edit_dialog_set_event (edit_dialog, NULL); } static void