From 23176131010f41b2f9a54bef50c8afa25472e195 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 2 Apr 2004 15:57:31 +0000 Subject: [PATCH] Allow app to call SetWindowVariant before creation of control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/window.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index b42ab7d15c..fef61c1184 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -650,9 +650,14 @@ void wxWindowMac::MacPostControlCreate(const wxPoint& pos, const wxSize& size) void wxWindowMac::DoSetWindowVariant( wxWindowVariant variant ) { - wxASSERT( m_macControl != NULL ) ; + // Don't assert, in case we set the window variant before + // the window is created + // wxASSERT( m_macControl != NULL ) ; + + m_windowVariant = variant ; - m_windowVariant = variant ; + if (!m_macControl) + return; ControlSize size ; ThemeFontID themeFont = kThemeSystemFont ; -- 2.45.2