From 8927d6d11c67c84ff51b499d99c6f7a9670d3b78 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 1 Aug 2005 01:07:28 +0000 Subject: [PATCH] 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 --- samples/toolbar/toolbar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index a115521897..5284572c39 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -587,7 +587,8 @@ void MyFrame::OnToggleAnotherToolbar(wxCommandEvent& WXUNUSED(event)) } else { - long style = GetToolBar()->GetWindowStyle(); + long style = GetToolBar() ? GetToolBar()->GetWindowStyle() + : TOOLBAR_STYLE; style &= ~wxTB_HORIZONTAL; style |= wxTB_VERTICAL; -- 2.45.2