git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53494
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxToolBar::HandleSize(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam)
{
bool wxToolBar::HandleSize(WXWPARAM WXUNUSED(wParam), WXLPARAM lParam)
{
+ // wait until we have some tools
+ if ( !GetToolsCount() )
+ return false;
+
// calculate our minor dimension ourselves - we're confusing the standard
// logic (TB_AUTOSIZE) with our horizontal toolbars and other hacks
const RECT r = wxGetTBItemRect(GetHwnd(), 0);
// calculate our minor dimension ourselves - we're confusing the standard
// logic (TB_AUTOSIZE) with our horizontal toolbars and other hacks
const RECT r = wxGetTBItemRect(GetHwnd(), 0);