[gnome-builder] flatpak: clear preferences before cancellations



commit 808d2e1257877b2b4014dc43ff13ee6d57fe89cc
Author: Christian Hergert <chergert redhat com>
Date:   Mon Aug 28 14:00:06 2017 -0700

    flatpak: clear preferences before cancellations
    
    We don't want them to try to re-register anything once we are in the
    destruction case, so clear preferences first.

 plugins/flatpak/gbp-flatpak-preferences-addin.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/flatpak/gbp-flatpak-preferences-addin.c b/plugins/flatpak/gbp-flatpak-preferences-addin.c
index 2ea3686..bdd66b0 100644
--- a/plugins/flatpak/gbp-flatpak-preferences-addin.c
+++ b/plugins/flatpak/gbp-flatpak-preferences-addin.c
@@ -418,6 +418,11 @@ gbp_flatpak_preferences_addin_unload (IdePreferencesAddin *addin,
   g_assert (GBP_IS_FLATPAK_PREFERENCES_ADDIN (self));
   g_assert (DZL_IS_PREFERENCES (preferences));
 
+  /* Clear preferences so reload code doesn't try to
+   * make forward progress updating items.
+   */
+  self->preferences = NULL;
+
   app_addin = gbp_flatpak_application_addin_get_default ();
   ide_clear_signal_handler (app_addin, &self->reload_handler);
 
@@ -432,7 +437,6 @@ gbp_flatpak_preferences_addin_unload (IdePreferencesAddin *addin,
     }
 
   g_clear_pointer (&self->ids, g_array_unref);
-  self->preferences = NULL;
 
   IDE_EXIT;
 }


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