[gnome-calendar] window: set edit dialog's event to NULL after saving



commit 6f87ada70dbeae71e3428ee3a63f79b8c918f121
Author: Yash Singh <yashdev10p gmail com>
Date:   Fri Mar 10 17:58:52 2017 +0530

    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 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 263be51..b44af8f 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]