X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84f7908b99660dc0556d9352c62ad717e679dd4d..88594d02eb59a55ac85d3210a49d02918124617b:/src/common/framecmn.cpp diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index fc7b2f413a..7b067ddf0d 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -148,12 +148,13 @@ wxPoint wxFrameBase::GetClientAreaOrigin() const wxPoint pt = wxTopLevelWindow::GetClientAreaOrigin(); #if wxUSE_TOOLBAR - if ( GetToolBar() && GetToolBar()->IsShown() ) + wxToolBar *toolbar = GetToolBar(); + if ( toolbar && toolbar->IsShown() ) { int w, h; - GetToolBar()->GetSize(& w, & h); + toolbar->GetSize(&w, &h); - if ( GetToolBar()->GetWindowStyleFlag() & wxTB_VERTICAL ) + if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL ) { pt.x += w; } @@ -186,7 +187,7 @@ bool wxFrameBase::ProcessCommand(int id) { if (!item->IsEnabled()) return TRUE; - + if (item->IsCheckable()) { item->Toggle();