[RAPPS] Fix double free when closing rapps

This commit is contained in:
Mark Jansen 2021-06-09 22:56:53 +02:00
parent 9229e73f03
commit 675edad96f
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
2 changed files with 14 additions and 7 deletions

View file

@ -1113,12 +1113,18 @@ CAppInfoDisplay::~CAppInfoDisplay()
// **** CAppsListView ****
CAppsListView::CAppsListView() :
bHasCheckboxes(FALSE),
nLastHeaderID(-1)
CAppsListView::CAppsListView()
{
}
CAppsListView::~CAppsListView()
{
if (m_hImageListView)
{
ImageList_Destroy(m_hImageListView);
}
}
VOID CAppsListView::SetCheckboxesVisible(BOOL bIsVisible)
{
if (bIsVisible)
@ -1253,7 +1259,7 @@ INT CAppsListView::CompareFunc(LPARAM lParam1, LPARAM lParam2, INT iSubItem)
HWND CAppsListView::Create(HWND hwndParent)
{
RECT r = { 205, 28, 465, 250 };
DWORD style = WS_CHILD | WS_VISIBLE | LVS_SORTASCENDING | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_AUTOARRANGE;
DWORD style = WS_CHILD | WS_VISIBLE | LVS_SORTASCENDING | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_AUTOARRANGE | LVS_SHAREIMAGELISTS;
HWND hwnd = CListView::Create(hwndParent, r, NULL, style, WS_EX_CLIENTEDGE);

View file

@ -211,20 +211,21 @@ class CAppsListView :
};
BOOL bIsAscending = TRUE;
BOOL bHasCheckboxes;
BOOL bHasCheckboxes = FALSE;
INT ItemCount = 0;
INT CheckedItemCount = 0;
INT ColumnCount = 0;
INT nLastHeaderID;
INT nLastHeaderID = -1;
APPLICATION_VIEW_TYPE ApplicationViewType = AppViewTypeEmpty;
HIMAGELIST m_hImageListView;
HIMAGELIST m_hImageListView = NULL;
public:
CAppsListView();
~CAppsListView();
VOID SetCheckboxesVisible(BOOL bIsVisible);