]> spindle.queued.net Git - midori/commitdiff
Only apply settings on the web view if we actually have any
authorChristian Dywan <christian@twotoasts.de>
Sat, 28 Feb 2009 13:03:23 +0000 (14:03 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sat, 28 Feb 2009 13:03:23 +0000 (14:03 +0100)
midori/midori-view.c

index 928e39e874df29065c3d284ef0b06de187ee260d..2b0a2023e3eb1e922dcacd471c97ce96e90d53be 100644 (file)
@@ -1602,10 +1602,14 @@ midori_view_construct_web_view (MidoriView* view)
                       webkit_web_frame_load_done_cb, view,
                       NULL);
 
-    g_object_set (view->web_view, "settings", view->settings, NULL);
-    if (katze_object_has_property (view->web_view, "full-content-zoom"))
-        g_object_set (view->web_view, "full-content-zoom",
-        katze_object_get_boolean (view->settings, "zoom-text-and-images"), NULL);
+    if (view->settings)
+    {
+        g_object_set (view->web_view, "settings", view->settings, NULL);
+        if (katze_object_has_property (view->web_view, "full-content-zoom"))
+            g_object_set (view->web_view, "full-content-zoom",
+                katze_object_get_boolean (view->settings,
+                                          "zoom-text-and-images"), NULL);
+    }
 
     gtk_widget_show (view->web_view);
     gtk_container_add (GTK_CONTAINER (view), view->web_view);