]> spindle.queued.net Git - midori/commitdiff
Make sure there actually is a web view when returning the level
authorChristian Dywan <christian@twotoasts.de>
Thu, 5 Mar 2009 22:09:22 +0000 (23:09 +0100)
committerChristian Dywan <christian@twotoasts.de>
Thu, 5 Mar 2009 22:09:22 +0000 (23:09 +0100)
midori/midori-view.c

index c39d515c5088aca86a73807cb20f05b4d5fa1a5d..5c903741f0d81fdc87cc0807e1501d4f9fb9a3e3 100644 (file)
@@ -2248,7 +2248,9 @@ midori_view_get_zoom_level (MidoriView* view)
 {
     g_return_val_if_fail (MIDORI_IS_VIEW (view), 1.0f);
 
-    return webkit_web_view_get_zoom_level (WEBKIT_WEB_VIEW (view->web_view));
+    if (view->web_view != NULL)
+        return webkit_web_view_get_zoom_level (WEBKIT_WEB_VIEW (view->web_view));
+    return 1.0f;
 }
 
 /**