summaryrefslogtreecommitdiff
path: root/gobject-introspection
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2008-07-03 14:57:48 +0000
committerJürg Billeter <juergbi@src.gnome.org>2008-07-03 14:57:48 +0000
commitc826ed3dbc4b524ce2ffe3dda528bcbbf01451f9 (patch)
tree310f2a9e3766e2c46d31173e01a5e41361914574 /gobject-introspection
parent1d2c962ebe12a99d812643d78e277103be790196 (diff)
downloadvala-c826ed3dbc4b524ce2ffe3dda528bcbbf01451f9.tar.gz
Fix crash when checking header filename
2008-07-03 Jürg Billeter <j@bitron.ch> * gobject-introspection/scanner.c: (g_igenerator_add_symbol): Fix crash when checking header filename svn path=/trunk/; revision=1673
Diffstat (limited to 'gobject-introspection')
-rw-r--r--gobject-introspection/scanner.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gobject-introspection/scanner.c b/gobject-introspection/scanner.c
index 3b186cf6d..834c5f6ba 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);