[gnome-builder/wip/libide: 197/237] libide: fix service discovery logic bomb
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide: 197/237] libide: fix service discovery logic bomb
- Date: Tue, 17 Feb 2015 21:45:58 +0000 (UTC)
commit b49305e3bd7410f8bccd375086c85c2f98ff2ac1
Author: Christian Hergert <christian hergert me>
Date: Sun Feb 15 00:17:39 2015 -0800
libide: fix service discovery logic bomb
libide/ide-context.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/libide/ide-context.c b/libide/ide-context.c
index 9aa7ed0..7f37388 100644
--- a/libide/ide-context.c
+++ b/libide/ide-context.c
@@ -374,16 +374,13 @@ ide_context_get_service_typed (IdeContext *context,
while (g_hash_table_iter_next (&iter, &key, &value))
{
- service = value;
+ IdeService *item = value;
- if (g_type_is_a (G_TYPE_FROM_INSTANCE (service), service_type))
- return service;
+ if (g_type_is_a (G_TYPE_FROM_INSTANCE (item), service_type))
+ return item;
}
- if (!service)
- service = ide_context_create_service (context, service_type);
-
- return service;
+ return ide_context_create_service (context, service_type);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]