diff options
Diffstat (limited to 'WebCore/platform/android/WidgetAndroid.cpp')
-rw-r--r-- | WebCore/platform/android/WidgetAndroid.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/WebCore/platform/android/WidgetAndroid.cpp b/WebCore/platform/android/WidgetAndroid.cpp index 84ab26c..850721d 100644 --- a/WebCore/platform/android/WidgetAndroid.cpp +++ b/WebCore/platform/android/WidgetAndroid.cpp @@ -118,9 +118,11 @@ int Widget::screenWidth() const } if (!widget) return 0; - - return android::WebViewCore::getWebViewCore( - static_cast<const ScrollView*>(widget))->screenWidth(); + android::WebViewCore* core = android::WebViewCore::getWebViewCore( + static_cast<const ScrollView*>(widget)); + if (!core) + return 0; + return core->screenWidth(); } } // WebCore namepsace |