[gnome-builder] glade: fix error propagation when saving



commit dc0adb92bdebce429e3194688ab527e7e598bd57
Author: Christian Hergert <chergert redhat com>
Date:   Sat Aug 31 09:48:02 2019 -0700

    glade: fix error propagation when saving
    
    We might have NULL here if the user chose not to save the changes.
    
    Fixes #1028

 src/plugins/glade/gbp-glade-page.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/glade/gbp-glade-page.c b/src/plugins/glade/gbp-glade-page.c
index 70fc8432e..2b88c3172 100644
--- a/src/plugins/glade/gbp-glade-page.c
+++ b/src/plugins/glade/gbp-glade-page.c
@@ -244,8 +244,13 @@ gbp_glade_page_agree_to_close_async (IdePage       *view,
     {
       if (!_gbp_glade_page_save (self, &error))
         {
-          ide_task_return_error (task, g_steal_pointer (&error));
-          return;
+          if (error != NULL)
+            {
+              ide_task_return_error (task, g_steal_pointer (&error));
+              return;
+            }
+
+          /* No was clicked on an internal glade save dialog, fallthrough */
         }
     }
 


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