X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..d23a4aa78189bdbc15925a11078291c2722ca473:/src/mac/carbon/spinctrl.cpp?ds=sidebyside diff --git a/src/mac/carbon/spinctrl.cpp b/src/mac/carbon/spinctrl.cpp index 2a57f1e0b9..b006866a06 100644 --- a/src/mac/carbon/spinctrl.cpp +++ b/src/mac/carbon/spinctrl.cpp @@ -5,7 +5,7 @@ // Modified by: Mark Newsam (Based on GTK file) // RCS-ID: $Id$ // Copyright: (c) Robert Roebling -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -196,6 +196,9 @@ wxSpinCtrl::~wxSpinCtrl() wxSize wxSpinCtrl::DoGetBestSize() const { + if (!m_btn || !m_text) + return GetSize(); + wxSize sizeBtn = m_btn->GetBestSize(), sizeText = m_text->GetBestSize();