Index: Source/core/testing/Internals.cpp |
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp |
index 02739983adb053c76e67ec41ad67ce52067a1a1f..059d0d16dad8433ad198376ba1d1b79e0ca3938a 100644 |
--- a/Source/core/testing/Internals.cpp |
+++ b/Source/core/testing/Internals.cpp |
@@ -1617,6 +1617,9 @@ bool Internals::hasGrammarMarker(Document* document, int from, int length, Excep |
unsigned Internals::numberOfScrollableAreas(Document* document, ExceptionState&) |
{ |
+ if (!document || !document->frame()) |
+ return 0; |
+ |
unsigned count = 0; |
LocalFrame* frame = document->frame(); |
if (frame->view()->scrollableAreas()) |