Fix a small leak

svn path=/trunk/; revision=17308
This commit is contained in:
Matthias Clasen 2007-02-16 06:09:02 +00:00
parent 14dab9515d
commit 8dc8ac3197
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-02-16 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmain.c: Run pre_parse_hook only once. (#403139, Kjartan
Maraas)
2007-02-15 Matthias Clasen <mclasen@redhat.com>
* gdk/x11/gdmain-x11.c (_gdk_xgrab_check_button_event): Be more

View File

@ -136,6 +136,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;
@ -350,7 +351,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;
@ -520,6 +521,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