don't crash when showing vert toolbar when horz one is not shown

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-08-01 01:07:28 +00:00
parent 7a7d2a14fd
commit 8927d6d11c

View File

@ -587,7 +587,8 @@ void MyFrame::OnToggleAnotherToolbar(wxCommandEvent& WXUNUSED(event))
} }
else else
{ {
long style = GetToolBar()->GetWindowStyle(); long style = GetToolBar() ? GetToolBar()->GetWindowStyle()
: TOOLBAR_STYLE;
style &= ~wxTB_HORIZONTAL; style &= ~wxTB_HORIZONTAL;
style |= wxTB_VERTICAL; style |= wxTB_VERTICAL;