X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88046bdac58dfe8cca0f4410565a31c7b39ddd39..6f26925422c2de7938509657eb981d6f752a6249:/src/common/tbarbase.cpp?ds=sidebyside diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index f6bc3617dc..94d015f155 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -61,7 +61,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject) wxToolBarToolBase::~wxToolBarToolBase() { +#if wxUSE_MENUS delete m_dropdownMenu; +#endif + if ( IsControl() ) GetControl()->Destroy(); } @@ -121,11 +124,13 @@ bool wxToolBarToolBase::SetLongHelp(const wxString& help) } +#if wxUSE_MENUS void wxToolBarToolBase::SetDropdownMenu(wxMenu* menu) { delete m_dropdownMenu; m_dropdownMenu = menu; } +#endif // ---------------------------------------------------------------------------- @@ -729,6 +734,7 @@ void wxToolBarBase::UpdateWindowUI(long flags) } } +#if wxUSE_MENUS bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu) { wxToolBarToolBase * const tool = FindById(toolid); @@ -741,6 +747,7 @@ bool wxToolBarBase::SetDropdownMenu(int toolid, wxMenu* menu) return true; } +#endif #if WXWIN_COMPATIBILITY_2_8