]> git.saurik.com Git - wxWidgets.git/commitdiff
DoGetBestSize may be called before m_text and m_choice are set,
authorJulian Smart <julian@anthemion.co.uk>
Sat, 19 Jun 2004 14:55:25 +0000 (14:55 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 19 Jun 2004 14:55:25 +0000 (14:55 +0000)
so check

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/combobox.cpp

index 6ca5ce57db62b76934edd9a6c3f4a130be74a78b..b1b55589f0fa0a054bd3a50dcb0cdac195ffcafe 100644 (file)
@@ -205,6 +205,8 @@ wxComboBox::~wxComboBox()
 
 wxSize wxComboBox::DoGetBestSize() const
 {
+    if (!m_choice || !m_text)
+        return GetSize();
     wxSize size = m_choice->GetBestSize();
     
     if ( m_text != NULL )