[gedit] Do not get data from a destroyed widget



commit b0d8c67f58fa68772c273bb1a04fd3e43114acbe
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Wed Aug 27 08:52:29 2014 +0200

    Do not get data from a destroyed widget

 gedit/gedit-commands-file.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index ecf4723..85e5063 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -1393,12 +1393,12 @@ quit_if_needed (GeditWindow *window)
        is_quitting = GPOINTER_TO_BOOLEAN (g_object_get_data (G_OBJECT (window),
                                                              GEDIT_IS_QUITTING));
 
-       if (is_quitting)
-               gtk_widget_destroy (GTK_WIDGET (window));
-
        is_quitting_all = GPOINTER_TO_BOOLEAN (g_object_get_data (G_OBJECT (window),
                                                                  GEDIT_IS_QUITTING_ALL));
 
+       if (is_quitting)
+               gtk_widget_destroy (GTK_WIDGET (window));
+
        if (is_quitting_all)
        {
                GtkApplication *app;


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