bug in menu accelerators code corrected (don't create empty accel table,
this exposes a bug in Win32 API :-) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1014,7 +1014,7 @@ void wxMenuBar::Attach(wxFrame *frame)
|
||||
|
||||
m_menuBarFrame = frame;
|
||||
|
||||
// create the accel table - we consider that the toolbar construction is
|
||||
// create the accel table - we consider that the menubar construction is
|
||||
// finished
|
||||
size_t nAccelCount = 0;
|
||||
int i;
|
||||
@@ -1023,6 +1023,8 @@ void wxMenuBar::Attach(wxFrame *frame)
|
||||
nAccelCount += m_menus[i]->GetAccelCount();
|
||||
}
|
||||
|
||||
if ( nAccelCount )
|
||||
{
|
||||
wxAcceleratorEntry *accelEntries = new wxAcceleratorEntry[nAccelCount];
|
||||
|
||||
nAccelCount = 0;
|
||||
@@ -1035,6 +1037,7 @@ void wxMenuBar::Attach(wxFrame *frame)
|
||||
|
||||
delete [] accelEntries;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// wxMenuBar searching for menu items
|
||||
|
Reference in New Issue
Block a user