Skip to content

Commit

Permalink
Fix CEF crash on resource restart
Browse files Browse the repository at this point in the history
  • Loading branch information
botder committed Oct 29, 2018
1 parent fe560c2 commit 3372f0f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Client/cefweb/CWebCore.cpp
Expand Up @@ -127,12 +127,24 @@ void CWebCore::DoPulse()

CWebView* CWebCore::FindWebView(CefRefPtr<CefBrowser> browser)
{
if (!browser)
return nullptr;

for (auto pWebView : m_WebViews)
{
if (!pWebView)
continue;

CefRefPtr<CefBrowser> pBrowser = pWebView->GetCefBrowser();

if (!pBrowser)
continue;

// CefBrowser objects are not unique
if (pWebView->GetCefBrowser()->GetIdentifier() == browser->GetIdentifier())
if (pBrowser->GetIdentifier() == browser->GetIdentifier())
return pWebView.get();
}

return nullptr;
}

Expand Down

0 comments on commit 3372f0f

Please sign in to comment.