Fixes a crash when stepping out in the Inspector's debugger.
[WebKit-https.git] / WebCore / page / InspectorController.cpp
index 5793768..256ddc9 100644 (file)
@@ -828,8 +828,8 @@ static JSValueRef currentCallFrame(JSContextRef ctx, JSObjectRef /*function*/, J
         return JSValueMakeUndefined(ctx);
 
     JavaScriptCallFrame* callFrame = controller->currentCallFrame();
-    if (!callFrame->isValid())
-        return JSValueMakeUndefined(ctx);
+    if (!callFrame || !callFrame->isValid())
+        return JSValueMakeNull(ctx);
 
     ExecState* globalExec = callFrame->execState()->lexicalGlobalObject()->globalExec();