From 50d8f0227990b0f383764f5e371ab1ca79685caf Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 18 Sep 2006 07:52:49 +0000 Subject: [PATCH] fixed crash when no status bar is present, conditionals around optional parts git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/frame.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mac/carbon/frame.cpp b/src/mac/carbon/frame.cpp index 47d8fd32cb..d414c78a6b 100644 --- a/src/mac/carbon/frame.cpp +++ b/src/mac/carbon/frame.cpp @@ -344,15 +344,19 @@ void wxFrame::PositionToolBar() int cw, ch; GetSize( &cw , &ch ) ; - - int statusX, statusY; - GetStatusBar()->GetClientSize(&statusX, &statusY); + int statusX = 0 ; + int statusY = 0 ; + +#if wxUSE_STATUSBAR if (GetStatusBar() && GetStatusBar()->IsShown()) { + GetStatusBar()->GetClientSize(&statusX, &statusY); ch -= statusY; } +#endif +#if wxUSE_TOOLBAR if (GetToolBar()) { int tx, ty, tw, th; @@ -383,6 +387,7 @@ void wxFrame::PositionToolBar() #endif } } +#endif } void wxFrame::PositionBars() -- 2.45.2