From e14e0b2f158bc97b3c332080c3562897b7aefeaf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 12 Jun 2012 21:57:02 +0000 Subject: [PATCH] No real changes, just add a wxCHECK to GetDlgUnitBase(). Verify that we do have a valid TLW parent: even though this normally should be always the case, it might not be when the window is being created or destroyed, see #14355. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/wincmn.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 2921c1f04b..031712592b 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2747,6 +2747,8 @@ wxSize wxWindowBase::GetDlgUnitBase() const { const wxWindowBase * const parent = wxGetTopLevelParent((wxWindow*)this); + wxCHECK_MSG( parent, wxDefaultSize, wxS("Must have TLW parent") ); + if ( !parent->m_font.IsOk() ) { // Default GUI font is used. This is the most common case, so