Skip to content

Commit a4b9018

Browse files
committed
Merge pull request #246 from mmv/aliasedfunctions
Don't break when calling aliased methods of CRL object
2 parents 845cb25 + 7e44831 commit a4b9018

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CefSharp/Internals/JavascriptBinding/BindingHandler.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ namespace CefSharp
3333
bool BindingHandler::Execute(const CefString& name, CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval, CefString& exception)
3434
{
3535
auto unmanagedWrapper = static_cast<UnmanagedWrapper*>(object->GetUserData().get());
36+
if (unmanagedWrapper == nullptr)
37+
{
38+
exception = "Illegal invocation";
39+
return true;
40+
}
41+
3642
Object^ self = unmanagedWrapper->Get();
3743

3844
if (self == nullptr)
@@ -409,4 +415,4 @@ namespace CefSharp
409415
}
410416
}
411417
}
412-
}
418+
}

0 commit comments

Comments
 (0)