Fix crash in CefTaskRunnerImpl::GetTaskRunner when CEF is not initialized (issue #1925)

This commit is contained in:
Marshall Greenblatt 2016-06-15 14:11:30 -04:00
parent 262e327c74
commit 66425def4a
1 changed files with 2 additions and 1 deletions

View File

@ -85,7 +85,8 @@ scoped_refptr<base::SequencedTaskRunner>
break;
};
if (id >= 0 && CefContentClient::Get()->browser() &&
if (id >= 0 && CefContentClient::Get() &&
CefContentClient::Get()->browser() &&
BrowserThread::IsMessageLoopValid(static_cast<BrowserThread::ID>(id))) {
// Don't use BrowserThread::GetMessageLoopProxyForThread because it returns
// a new MessageLoopProxy object for each call and makes pointer equality