Fix a small leak

svn path=/branches/gtk-2-10/; revision=17309
This commit is contained in:
Matthias Clasen
2007-02-16 06:13:15 +00:00
parent 37b0d5d7c8
commit 04ebc430df
2 changed files with 14 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
2007-02-16 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
* gtk/gtkmain.c: Run pre_parse_hook only once. (#403139, Kjartan
Maraas)
2007-02-15 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:

View File

@@ -135,6 +135,7 @@ const guint gtk_binary_age = GTK_BINARY_AGE;
const guint gtk_interface_age = GTK_INTERFACE_AGE;
static guint gtk_main_loop_level = 0;
static gint pre_initialized = FALSE;
static gint gtk_initialized = FALSE;
static GList *current_events = NULL;
@@ -349,7 +350,7 @@ static gboolean do_setlocale = TRUE;
void
gtk_disable_setlocale (void)
{
if (gtk_initialized)
if (pre_initialized)
g_warning ("gtk_disable_setlocale() must be called before gtk_init()");
do_setlocale = FALSE;
@@ -519,6 +520,11 @@ do_pre_parse_initialization (int *argc,
g_set_print_handler (gtk_print);
#endif
if (pre_initialized)
return;
pre_initialized = TRUE;
if (do_setlocale)
{
#ifdef G_OS_WIN32