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:
parent
7deb97e510
commit
5093e7de37
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user