From 51e14ebe643c7cae747103f5e624d9e46d1b4581 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 20 Jun 2004 22:21:13 +0000 Subject: [PATCH] Crash fix git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27916 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/spinctrl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mac/carbon/spinctrl.cpp b/src/mac/carbon/spinctrl.cpp index 3316f6a92e..b006866a06 100644 --- a/src/mac/carbon/spinctrl.cpp +++ b/src/mac/carbon/spinctrl.cpp @@ -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(); -- 2.47.2