From 282368ff8122a2957510a196976280ad8a47db1f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 22 Jun 2008 12:44:31 +0200 Subject: [PATCH] Fix a warning on startup when no search engine is available --- midori/midori-browser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index edc4c63f..29e9ea78 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -3349,7 +3349,8 @@ midori_browser_set_property (GObject* object, &last_web_search, NULL); web_item = midori_web_list_get_nth_item (browser->search_engines, last_web_search); - g_object_set (browser->search, "current-item", web_item, NULL); + if (web_item) + g_object_set (browser->search, "current-item", web_item, NULL); } break; default: