[mutter] monitor-config-store: Don't clear cancellable when cancelled



commit 5ed954e6de2b0d75c5b1f3ae550e7802bbc24997
Author: Jonas Ådahl <jadahl gmail com>
Date:   Mon Sep 11 11:21:16 2017 +0800

    monitor-config-store: Don't clear cancellable when cancelled
    
    The cancellable should only be cleared if we weren't cancelled, as if
    we were cancelled, the path cancelling have already cleared the
    cancellable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787477

 src/backends/meta-monitor-config-store.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/backends/meta-monitor-config-store.c b/src/backends/meta-monitor-config-store.c
index 95cc155..95192c9 100644
--- a/src/backends/meta-monitor-config-store.c
+++ b/src/backends/meta-monitor-config-store.c
@@ -1230,9 +1230,10 @@ saved_cb (GObject      *object,
   if (!g_file_replace_contents_finish (G_FILE (object), result, NULL, &error))
     {
       if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-        g_warning ("Saving monitor configuration failed: %s\n", error->message);
-      else
-        g_clear_object (&data->config_store->save_cancellable);
+        {
+          g_warning ("Saving monitor configuration failed: %s\n", error->message);
+          g_clear_object (&data->config_store->save_cancellable);
+        }
 
       g_error_free (error);
     }


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