[gnome-builder] config: avoid signal emissions when unloading
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] config: avoid signal emissions when unloading
- Date: Thu, 1 Feb 2018 04:12:08 +0000 (UTC)
commit 764d82a5588d66554087c8e36dcf5b1e1cc48465
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 31 20:10:40 2018 -0800
config: avoid signal emissions when unloading
Don't emit any changes during shutdown, since we just increase
the chance that we'll make plugins hit assertion cases.
src/libide/config/ide-configuration.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/libide/config/ide-configuration.c b/src/libide/config/ide-configuration.c
index 950eba7df..a0de50dc2 100644
--- a/src/libide/config/ide-configuration.c
+++ b/src/libide/config/ide-configuration.c
@@ -204,6 +204,9 @@ ide_configuration_device_manager_items_changed (IdeConfiguration *self,
g_assert (IDE_IS_CONFIGURATION (self));
g_assert (IDE_IS_DEVICE_MANAGER (device_manager));
+ if (ide_object_is_unloading (IDE_OBJECT (self)))
+ return;
+
device = ide_device_manager_get_device (device_manager, priv->device_id);
device_ready = !!device;
@@ -231,6 +234,9 @@ ide_configuration_runtime_manager_items_changed (IdeConfiguration *self,
g_assert (IDE_IS_CONFIGURATION (self));
g_assert (IDE_IS_RUNTIME_MANAGER (runtime_manager));
+ if (ide_object_is_unloading (IDE_OBJECT (self)))
+ return;
+
runtime = ide_runtime_manager_get_runtime (runtime_manager, priv->runtime_id);
runtime_ready = !!runtime;
@@ -253,6 +259,9 @@ ide_configuration_environment_changed (IdeConfiguration *self,
g_assert (IDE_IS_CONFIGURATION (self));
g_assert (IDE_IS_ENVIRONMENT (environment));
+ if (ide_object_is_unloading (IDE_OBJECT (self)))
+ return;
+
ide_configuration_set_dirty (self, TRUE);
ide_configuration_emit_changed (self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]