SF Patch #728691, dangling pointer fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9a55c2ee2a
commit
cd01e3646a
@ -2429,13 +2429,13 @@ static void wxDeleteInternalData(wxListCtrl* ctl, long itemId)
|
||||
wxListItemInternalData *data = wxGetInternalData(ctl, itemId);
|
||||
if (data)
|
||||
{
|
||||
delete data;
|
||||
LV_ITEM item;
|
||||
memset(&item, 0, sizeof(item));
|
||||
item.iItem = itemId;
|
||||
item.mask = LVIF_PARAM;
|
||||
item.lParam = (LPARAM) 0;
|
||||
ListView_SetItem((HWND)ctl->GetHWND(), &item);
|
||||
delete data;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user