From 483efacde6e092bd4d7ecca8678feab7555edc04 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 28 Feb 2007 21:40:32 +0000 Subject: [PATCH] Fix runtime crash in wxStdDialogButtonSizer. Don't set the label on a button we don't have. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/sizer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 84473ce9cc..a229acc32a 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -2025,7 +2025,8 @@ void wxStdDialogButtonSizer::Realize() if (m_buttonAffirmative->GetId() == wxID_SAVE){ // these buttons have set labels under Mac so we should use them m_buttonAffirmative->SetLabel(_("Save")); - m_buttonNegative->SetLabel(_("Don't Save")); + if (m_buttonNegative) + m_buttonNegative->SetLabel(_("Don't Save")); } }