diff options
-rw-r--r-- | WebCore/platform/android/ScreenAndroid.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/WebCore/platform/android/ScreenAndroid.cpp b/WebCore/platform/android/ScreenAndroid.cpp index 21df08a..70cf794 100644 --- a/WebCore/platform/android/ScreenAndroid.cpp +++ b/WebCore/platform/android/ScreenAndroid.cpp @@ -68,6 +68,9 @@ bool screenIsMonochrome(Widget* page) // the accuracy of these number are not too important. FloatRect screenRect(Widget* page) { + if (!page) + return FloatRect(); + IntRect rect = page->root()->platformWidget()->getBounds(); return FloatRect(0.0, 0.0, rect.width(), rect.height()); } @@ -76,6 +79,9 @@ FloatRect screenRect(Widget* page) // to position and resize windows (usually to full screen). FloatRect screenAvailableRect(Widget* page) { + if (!page) + return FloatRect(); + IntRect rect = page->root()->platformWidget()->getBounds(); return FloatRect(0.0, 0.0, rect.width(), rect.height()); } |