//-----------------------------------------------------------------------------
bool wxDockTaskBarIcon::RemoveIcon()
{
- if (m_pMenu)
- {
- delete m_pMenu;
- m_pMenu = NULL;
- }
+ wxDELETE(m_pMenu);
// restore old icon to the dock
OSStatus err = RestoreApplicationDockTileImage();