X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34c3ffca5b9a22a972ae0296c8713f8ff1956566..6e406d3c7be7911f54464389113f8c5f9fc84633:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index f738746d00..2641125c24 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1185,9 +1185,9 @@ void wxWindowBase::DeleteRelatedConstraints() } #endif -void wxWindowBase::SetSizer(wxSizer *sizer) +void wxWindowBase::SetSizer(wxSizer *sizer, bool deleteOld) { - if (m_windowSizer) delete m_windowSizer; + if (m_windowSizer && deleteOld) delete m_windowSizer; m_windowSizer = sizer; }