projects
/
wxWidgets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e54266a
)
don't call TB_GETITEMRECT with invalid tool index
author
Vadim Zeitlin
<vadim@wxwidgets.org>
Thu, 8 May 2008 14:57:00 +0000
(14:57 +0000)
committer
Vadim Zeitlin
<vadim@wxwidgets.org>
Thu, 8 May 2008 14:57:00 +0000
(14:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53494
c3d73ce0
-8a6f-49c7-b76d-
6d57e0e08775
src/msw/toolbar.cpp
patch
|
blob
|
blame
|
history
diff --git
a/src/msw/toolbar.cpp
b/src/msw/toolbar.cpp
index 5c4b2c4d5b05a10afb18707bff335c83bcfb44ac..16bd76be16725f674805b32abca48fe80dab53b6 100644
(file)
--- a/
src/msw/toolbar.cpp
+++ b/
src/msw/toolbar.cpp
@@
-1642,6
+1642,10
@@
void wxToolBar::OnEraseBackground(wxEraseEvent& event)
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);