git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58578
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// the item can be not attached to any menu yet and SetItemLabel() is still
// valid to call in this case and should do nothing else
// the item can be not attached to any menu yet and SetItemLabel() is still
// valid to call in this case and should do nothing else
+ if ( !m_parentMenu )
+ return;
+
const UINT id = GetMSWId();
HMENU hMenu = GetHMenuOf(m_parentMenu);
if ( !hMenu || ::GetMenuState(hMenu, id, MF_BYCOMMAND) == (UINT)-1 )
const UINT id = GetMSWId();
HMENU hMenu = GetHMenuOf(m_parentMenu);
if ( !hMenu || ::GetMenuState(hMenu, id, MF_BYCOMMAND) == (UINT)-1 )