From b18a6580d25101524ad7fd975c93b8642dcbf19a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 2 Sep 2010 17:40:54 -0400 Subject: [PATCH] girepository: Call init_globals() This fixes the search path initialization if g_irepository_require is called first thing. --- girepository.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/girepository.c b/girepository.c index db4fdc977..a8c661ab7 100644 --- a/girepository.c +++ b/girepository.c @@ -168,19 +168,21 @@ g_irepository_get_search_path (void) return search_path; } -static -GSList * +static GSList * build_search_path_with_overrides (void) { - GSList *result; - if (override_search_path != NULL) - { - result = g_slist_copy (override_search_path); - g_slist_last (result)->next = g_slist_copy (search_path); - } - else - result = g_slist_copy (search_path); - return result; + GSList *result; + + init_globals (); + + if (override_search_path != NULL) + { + result = g_slist_copy (override_search_path); + g_slist_last (result)->next = g_slist_copy (search_path); + } + else + result = g_slist_copy (search_path); + return result; } static char *