summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/android
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/android')
-rw-r--r--WebCore/platform/android/ScrollViewAndroid.cpp5
-rw-r--r--WebCore/platform/android/WidgetAndroid.cpp8
2 files changed, 9 insertions, 4 deletions
diff --git a/WebCore/platform/android/ScrollViewAndroid.cpp b/WebCore/platform/android/ScrollViewAndroid.cpp
index bce09cf..a59faf3 100644
--- a/WebCore/platform/android/ScrollViewAndroid.cpp
+++ b/WebCore/platform/android/ScrollViewAndroid.cpp
@@ -103,7 +103,10 @@ void ScrollView::platformRepaintContentRectangle(const IntRect &rect, bool now)
#ifdef ANDROID_CAPTURE_OFFSCREEN_PAINTS
void ScrollView::platformOffscreenContentRectangle(const IntRect& rect)
{
- android::WebViewCore::getWebViewCore(this)->offInvalidate(rect);
+ android::WebViewCore* core = android::WebViewCore::getWebViewCore(this);
+ if (!core)
+ return;
+ core->offInvalidate(rect);
}
#endif
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