From 66425def4a446e180f9d8554a4632938274554d3 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 15 Jun 2016 14:11:30 -0400 Subject: [PATCH] Fix crash in CefTaskRunnerImpl::GetTaskRunner when CEF is not initialized (issue #1925) --- libcef/common/task_runner_impl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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