diff --git a/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp b/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp index 250214bca..c4d006bbd 100644 --- a/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp +++ b/CefSharp.BrowserSubprocess.Core/Async/JavascriptAsyncMethodHandler.cpp @@ -27,8 +27,15 @@ namespace CefSharp //this will create a promise and give us the reject/resolve functions {p: Promise, res: resolve(), rej: reject()} auto promiseData = promiseCreator->ExecuteFunctionWithContext(context, nullptr, CefV8ValueList()); - //when refreshing the browser this is sometimes null, in this case return - if(nullptr == promiseData) return true; + + //when refreshing the browser this is sometimes null, in this case return true and log message + //https://github.com/cefsharp/CefSharp/pull/2446 + if (promiseData == NULL) + { + LOG(WARNING) << "JavascriptAsyncMethodHandler::Execute promiseData returned NULL"; + + return true; + } retval = promiseData->GetValue("p");