mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
Add nullcheck to promiseData. This is null at times; I see it when refreshing the browser in the development tools.
This commit is contained in:
@@ -27,6 +27,9 @@ 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;
|
||||
|
||||
retval = promiseData->GetValue("p");
|
||||
|
||||
auto resolve = promiseData->GetValue("res");
|
||||
|
||||
Reference in New Issue
Block a user