From 67950a969c37660d35e9da792fbd95a97772e881 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 10 Jan 2018 10:43:12 +0100 Subject: winrt: Remove callback registrations on webview destruction Change-Id: Ie730be9fa46e5ab2a236c5e7c4a2533789e06a5e Reviewed-by: Maurice Kalinowski --- src/webview/qwebview_winrt.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/webview/qwebview_winrt.cpp b/src/webview/qwebview_winrt.cpp index d6ec493..fc999d2 100644 --- a/src/webview/qwebview_winrt.cpp +++ b/src/webview/qwebview_winrt.cpp @@ -348,6 +348,10 @@ QWinRTWebViewPrivate::~QWinRTWebViewPrivate() { QEventDispatcherWinRT::runOnXamlThread([this]() { HRESULT hr; + hr = d->ext->remove_NavigationStarting(d->navigationStartingToken); + Q_ASSERT_SUCCEEDED(hr); + hr = d->ext->remove_NavigationCompleted(d->navigationCompletedToken); + Q_ASSERT_SUCCEEDED(hr); ComPtr> children; hr = d->host->get_Children(&children); Q_ASSERT_SUCCEEDED(hr); -- cgit v1.2.3