From 0925d31985cd5a79a367db51922dd784fa12ce6d Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 16 Apr 2011 04:26:28 +0200 Subject: [PATCH] Don't load the soup session in idle callback Otherwise there's a race condition which may lead to not having setup the session before loading the first page or worse, crash in libSoup. --- midori/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/midori/main.c b/midori/main.c index 132b72e4..91ca9115 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1228,6 +1228,8 @@ midori_load_soup_session_full (gpointer settings) gchar* config_file; SoupSessionFeature* feature; + midori_load_soup_session (settings); + config_file = build_config_filename ("logins"); feature = g_object_new (KATZE_TYPE_HTTP_AUTH, "filename", config_file, NULL); g_free (config_file); @@ -1246,8 +1248,6 @@ midori_load_soup_session_full (gpointer settings) soup_session_add_feature (session, feature); g_object_unref (feature); - g_idle_add (midori_load_soup_session, settings); - return FALSE; } @@ -2267,7 +2267,7 @@ main (int argc, G_CALLBACK (midori_soup_session_block_uris_cb), g_strdup (block_uris)); midori_setup_inactivity_reset (browser, inactivity_reset, webapp); - g_idle_add (midori_load_soup_session, settings); + midori_load_soup_session (settings); midori_startup_timer ("App created: \t%f"); gtk_main (); return 0; -- 2.39.5