diff --git a/libcef/common/task_runner_impl.cc b/libcef/common/task_runner_impl.cc index 5df512c22..c2c4dc6a8 100644 --- a/libcef/common/task_runner_impl.cc +++ b/libcef/common/task_runner_impl.cc @@ -85,7 +85,8 @@ scoped_refptr break; }; - if (id >= 0 && CefContentClient::Get()->browser() && + if (id >= 0 && CefContentClient::Get() && + CefContentClient::Get()->browser() && BrowserThread::IsMessageLoopValid(static_cast(id))) { // Don't use BrowserThread::GetMessageLoopProxyForThread because it returns // a new MessageLoopProxy object for each call and makes pointer equality