diff --git a/CefSharp.Core.Runtime/RequestContext.h b/CefSharp.Core.Runtime/RequestContext.h index a465814d3..14c92d28c 100644 --- a/CefSharp.Core.Runtime/RequestContext.h +++ b/CefSharp.Core.Runtime/RequestContext.h @@ -118,7 +118,7 @@ namespace CefSharp /// Returns a new RequestContext static IRequestContext^ CreateContext(IRequestContext^ other, IRequestContextHandler^ requestContextHandler) { - auto otherRequestContext = static_cast(other); + auto otherRequestContext = static_cast(other->UnWrap()); CefRefPtr handler = requestContextHandler == nullptr ? NULL : new CefRequestContextHandlerAdapter(requestContextHandler); auto newContext = CefRequestContext::CreateContext(otherRequestContext, handler);