]> git.saurik.com Git - wxWidgets.git/commitdiff
Crash fix
authorJulian Smart <julian@anthemion.co.uk>
Sun, 20 Jun 2004 22:21:13 +0000 (22:21 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sun, 20 Jun 2004 22:21:13 +0000 (22:21 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/spinctrl.cpp

index 3316f6a92e93ab16d3c08f4be90105ec3b9f8de8..b006866a06f5865a9a52f755ae994ae248d66c5e 100644 (file)
@@ -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();