diff --git a/CefSharp.Core/ManagedCefBrowserAdapter.cpp b/CefSharp.Core/ManagedCefBrowserAdapter.cpp index e5e02730c..036411694 100644 --- a/CefSharp.Core/ManagedCefBrowserAdapter.cpp +++ b/CefSharp.Core/ManagedCefBrowserAdapter.cpp @@ -19,6 +19,13 @@ bool ManagedCefBrowserAdapter::IsDisposed::get() void ManagedCefBrowserAdapter::CreateBrowser(IWindowInfo^ windowInfo, BrowserSettings^ browserSettings, RequestContext^ requestContext, String^ address) { + if (browserSettings->IsDisposed) + { + throw gcnew ObjectDisposedException("browserSettings", "The BrowserSettings reference you have passed has already been disposed. " + + "You cannot reuse the BrowserSettings class at the moment. This may change in the next version, check " + + "https://github.com/cefsharp/CefSharp/issues/2643 for details."); + } + auto cefWindowInfoWrapper = static_cast(windowInfo); CefString addressNative = StringUtils::ToNative(address);