silently ignore NULL pointers in MSWOnMeasureItem(): apparently this can happen with MDI frames under XP
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33491 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
bcb8ba61c3
commit
b6afa1a38a
@ -3656,7 +3656,15 @@ wxWindowMSW::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
|
||||
{
|
||||
wxMenuItem *pMenuItem = (wxMenuItem *)(pMeasureStruct->itemData);
|
||||
|
||||
wxCHECK_MSG( pMenuItem && pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)),
|
||||
// according to Carsten Fuchs the pointer may be NULL under XP if an
|
||||
// MDI child frame is initially maximized, see this for more info:
|
||||
// http://article.gmane.org/gmane.comp.lib.wxwidgets.general/27745
|
||||
//
|
||||
// so silently ignore it instead of asserting
|
||||
if ( !pMenuItem )
|
||||
return false;
|
||||
|
||||
wxCHECK_MSG( wxDynamicCast(pMenuItem, wxMenuItem),
|
||||
false, _T("MSWOnMeasureItem: bad wxMenuItem pointer") );
|
||||
|
||||
size_t w, h;
|
||||
|
Loading…
Reference in New Issue
Block a user