]> spindle.queued.net Git - midori/commitdiff
Avoid a warning in case the speed dial head isn't available
authorChristian Dywan <christian@twotoasts.de>
Sat, 8 Aug 2009 21:52:51 +0000 (23:52 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 8 Aug 2009 21:52:51 +0000 (23:52 +0200)
Ideally we wouldn't depend on a file for essential data, for
now we ignore it.

midori/midori-view.c

index 1dc16d064707147fcd828fac9b1424a544c3dbed..812a6cd1a511fb4e7d46e25dbf9ba7e346ccf0e5 100644 (file)
@@ -2126,6 +2126,8 @@ midori_view_set_uri (MidoriView*  view,
 
             g_file_get_contents (MDATADIR "/midori/res/speeddial-head.html",
                                  &speed_dial_head, NULL, NULL);
+            if (G_UNLIKELY (!speed_dial_head))
+                speed_dial_head = g_strdup ("");
 
             res_server = sokoke_get_res_server ();
             port = soup_server_get_port (res_server);