diff --git a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp index ce122b5bc..7151d1ab0 100644 --- a/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp +++ b/CefSharp.Core/Internals/CefBrowserHostWrapper.cpp @@ -243,7 +243,10 @@ void CefBrowserHostWrapper::SendKeyEvent(int message, int wParam, int lParam) double CefBrowserHostWrapper::GetZoomLevelOnUI() { - ThrowIfDisposed(); + if (_disposed) + { + return 0.0; + } CefTaskScheduler::EnsureOn(TID_UI, "CefBrowserHostWrapper::GetZoomLevel"); diff --git a/CefSharp.Wpf/ChromiumWebBrowser.cs b/CefSharp.Wpf/ChromiumWebBrowser.cs index ee2ec3f52..f45467de6 100644 --- a/CefSharp.Wpf/ChromiumWebBrowser.cs +++ b/CefSharp.Wpf/ChromiumWebBrowser.cs @@ -582,7 +582,7 @@ namespace CefSharp.Wpf var task = this.GetZoomLevelAsync(); task.ContinueWith(previous => { - if (previous.IsCompleted) + if (previous.Status == TaskStatus.RanToCompletion) { UiThreadRunAsync(() => {