Fix a crash when calling CefShutdown() before destroying all browser windows (issue #159).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@157 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-01-07 01:06:10 +00:00
parent 650cb1d41d
commit c7959e2106
5 changed files with 126 additions and 27 deletions

View File

@ -393,9 +393,11 @@ bool CefRegisterScheme(const CefString& scheme_name,
const CefString& host_name,
CefRefPtr<CefSchemeHandlerFactory> factory)
{
// Verify that the context is already initialized
if(!_Context.get())
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
NOTREACHED();
return false;
}
// Use a smart pointer for the wrapper object because
// RunnableMethodTraits::RetainCallee() (originating from NewRunnableMethod)