From 1deb64c09ec4cb34a3ff403488823ac6562ad824 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sat, 19 Jun 2004 14:55:25 +0000 Subject: [PATCH] DoGetBestSize may be called before m_text and m_choice are set, so check git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27896 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/combobox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 6ca5ce57db..b1b55589f0 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -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 ) -- 2.49.0