]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/spinctrl.cpp
Limited setup.h warning fix.
[wxWidgets.git] / src / mac / carbon / spinctrl.cpp
index b0bb8c8441188a72baed5721bf289629c18461de..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();
 
@@ -322,7 +325,7 @@ void wxSpinCtrl::SetRange(int min, int max)
 
 void wxSpinCtrl::SetSelection(long from, long to)
 {
-    // if from and to are both -1, it means (in wxWindows) that all text should
+    // if from and to are both -1, it means (in wxWidgets) that all text should
     // be selected
     if ( (from == -1) && (to == -1) )
     {