diff --git a/libcef/browser/frame_host_impl.cc b/libcef/browser/frame_host_impl.cc index bae40ec80..7b2f6056f 100644 --- a/libcef/browser/frame_host_impl.cc +++ b/libcef/browser/frame_host_impl.cc @@ -367,6 +367,11 @@ void CefFrameHostImpl::SendCommand( if (frame_id < CefFrameHostImpl::kMainFrameId) return; + if (!render_frame_host_ || !response_manager_) { + // detached frame has no response_manager_ + return; + } + TRACE_EVENT2("cef", "CefFrameHostImpl::SendCommand", "frame_id", frame_id, "needsResponse", responseHandler.get() ? 1 : 0); Cef_Request_Params params; @@ -407,6 +412,11 @@ void CefFrameHostImpl::SendCode( if (frame_id < CefFrameHostImpl::kMainFrameId) return; + if (!render_frame_host_ || !response_manager_) { + // detached frame has no response_manager_ + return; + } + TRACE_EVENT2("cef", "CefFrameHostImpl::SendCommand", "frame_id", frame_id, "needsResponse", responseHandler.get() ? 1 : 0); Cef_Request_Params params;