From 7c10d2078accf1fb345b4e9bd5c049da4df4f0d0 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 5 Mar 2009 23:09:22 +0100 Subject: [PATCH] Make sure there actually is a web view when returning the level --- midori/midori-view.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index c39d515c..5c903741 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -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; } /** -- 2.39.5