Commit 8dc8ac31 authored by Matthias Clasen's avatar Matthias Clasen

Fix a small leak

svn path=/trunk/; revision=17308
parent 14dab951
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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment