From c826ed3dbc4b524ce2ffe3dda528bcbbf01451f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Thu, 3 Jul 2008 14:57:48 +0000 Subject: [PATCH] Fix crash when checking header filename MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-07-03 Jürg Billeter * gobject-introspection/scanner.c: (g_igenerator_add_symbol): Fix crash when checking header filename svn path=/trunk/; revision=1673 --- ChangeLog | 6 ++++++ gobject-introspection/scanner.c | 18 +++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02bb136..8261a6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,12 @@ * gobject-introspection/scanner.c: (g_igenerator_add_symbol): + Fix crash when checking header filename + +2008-07-03 Jürg Billeter + + * gobject-introspection/scanner.c: (g_igenerator_add_symbol): + Only drop duplicates of the same namespace 2008-07-02 Jürg Billeter diff --git a/gobject-introspection/scanner.c b/gobject-introspection/scanner.c index 3b186cf..834c5f6 100644 --- a/gobject-introspection/scanner.c +++ b/gobject-introspection/scanner.c @@ -1184,17 +1184,21 @@ g_igenerator_process_symbols (GIGenerator * igenerator) void g_igenerator_add_symbol (GIGenerator * igenerator, CSymbol * symbol) { + GList *l; + /* only add symbols of main file */ gboolean found_filename = FALSE; - GList *l; - for (l = igenerator->filenames; l != NULL; l = l->next) + if (igenerator->current_filename) { - if (strcmp (l->data, igenerator->current_filename) == 0) - { - found_filename = TRUE; - break; - } + for (l = igenerator->filenames; l != NULL; l = l->next) + { + if (strcmp (l->data, igenerator->current_filename) == 0) + { + found_filename = TRUE; + break; + } + } } symbol->directives = g_slist_reverse (igenerator->directives); -- 2.7.4