[gnome-builder/wip/chergert/layout] plugins: ensure we are checking for proper plugin_info



commit 01a79f548d8dc0b4d0ad39261718428acab2d138
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jul 14 16:53:14 2017 -0700

    plugins: ensure we are checking for proper plugin_info
    
    This was never initialized, and so it didn't do anything.

 libide/plugins/ide-extension-set-adapter.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libide/plugins/ide-extension-set-adapter.c b/libide/plugins/ide-extension-set-adapter.c
index 7a30843..f1cc94a 100644
--- a/libide/plugins/ide-extension-set-adapter.c
+++ b/libide/plugins/ide-extension-set-adapter.c
@@ -562,6 +562,12 @@ locate_extension_by_plugin_info (IdeExtensionSetAdapter *self,
     PeasExtension  *exten;
   } *lookup = user_data;
 
+  g_assert (IDE_IS_EXTENSION_SET_ADAPTER (self));
+  g_assert (plugin_info != NULL);
+  g_assert (exten != NULL);
+  g_assert (lookup != NULL);
+  g_assert (lookup->plugin_info != NULL);
+
   if (lookup->plugin_info == plugin_info)
     lookup->exten = exten;
 }
@@ -582,7 +588,7 @@ ide_extension_set_adapter_get_extension (IdeExtensionSetAdapter *self,
   struct {
     PeasPluginInfo *plugin_info;
     PeasExtension  *exten;
-  } lookup = { 0 };
+  } lookup = { plugin_info, NULL };
 
   g_return_val_if_fail (IDE_IS_EXTENSION_SET_ADAPTER (self), NULL);
   g_return_val_if_fail (plugin_info != NULL, NULL);


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