Fix recently introduced crash in MSW wxTaskbarButton::New()
Fixed regression introduced in f7458dd03f
("Use
wxComPtr<> instead of raw pointers in wxTaskbarButton code", see #16557).
Closes https://github.com/wxWidgets/wxWidgets/pull/96
This commit is contained in:
committed by
Vadim Zeitlin
parent
7e6836e9f5
commit
870a545345
@@ -698,7 +698,7 @@ bool wxThumbBarButton::UpdateParentTaskBarButton()
|
|||||||
/* static */
|
/* static */
|
||||||
wxTaskBarButton* wxTaskBarButton::New(wxWindow* parent)
|
wxTaskBarButton* wxTaskBarButton::New(wxWindow* parent)
|
||||||
{
|
{
|
||||||
wxCOMPtr<wxITaskbarList3> taskbarList;
|
wxITaskbarList3* taskbarList = NULL;
|
||||||
|
|
||||||
HRESULT hr = CoCreateInstance
|
HRESULT hr = CoCreateInstance
|
||||||
(
|
(
|
||||||
@@ -720,6 +720,7 @@ wxTaskBarButton* wxTaskBarButton::New(wxWindow* parent)
|
|||||||
// This is however unexpected.
|
// This is however unexpected.
|
||||||
wxLogApiError(wxT("ITaskbarList3::Init"), hr);
|
wxLogApiError(wxT("ITaskbarList3::Init"), hr);
|
||||||
|
|
||||||
|
taskbarList->Release();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user