1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-23 23:21:08 +01:00

Weather: Fix and free event registration tokens

This commit is contained in:
Valentin Radu 2022-05-28 13:41:05 +03:00
parent 7deb97e510
commit 5093e7de37
2 changed files with 10 additions and 2 deletions

View File

@ -1375,6 +1375,14 @@ DWORD WINAPI epw_Weather_MainThread(EPWeather* _this)
cleanup:
if (_this->tkOnNavigationCompleted.value)
{
_this->pCoreWebView2->lpVtbl->remove_NavigationCompleted(_this->pCoreWebView2, _this->tkOnNavigationCompleted);
}
if (_this->tkOnPermissionRequested.value)
{
_this->pCoreWebView2->lpVtbl->remove_PermissionRequested(_this->pCoreWebView2, _this->tkOnPermissionRequested);
}
if (_this->pCoreWebView2)
{
_this->pCoreWebView2->lpVtbl->Release(_this->pCoreWebView2);

View File

@ -78,8 +78,8 @@ typedef interface EPWeather
ITaskbarList* pTaskList;
ICoreWebView2Controller* pCoreWebView2Controller;
ICoreWebView2* pCoreWebView2;
EventRegistrationToken* tkOnNavigationCompleted;
EventRegistrationToken* tkOnPermissionRequested;
EventRegistrationToken tkOnNavigationCompleted;
EventRegistrationToken tkOnPermissionRequested;
RECT rc;
LONG64 dpiXInitial;
LONG64 dpiYInitial;