Index: Source/WebCore/bindings/v8/V8Helpers.cpp |
=================================================================== |
--- Source/WebCore/bindings/v8/V8Helpers.cpp (revision 106820) |
+++ Source/WebCore/bindings/v8/V8Helpers.cpp (working copy) |
@@ -42,7 +42,7 @@ |
{ |
V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject); |
DOMWindow* domWindow = object->rootObject; |
- if (!domWindow || domWindow != domWindow->frame()->domWindow()) |
+ if (!domWindow || !domWindow->frame() || domWindow != domWindow->frame()->domWindow()) |
return v8::Local<v8::Context>(); |
return V8Proxy::mainWorldContext(object->rootObject->frame()); |
} |