]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for wxPython segvs
authorRobert Roebling <robert@roebling.de>
Sat, 1 May 1999 21:23:41 +0000 (21:23 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 1 May 1999 21:23:41 +0000 (21:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp
src/gtk1/window.cpp

index 012b2c5082c2ec8e66f2ae0fe22e6459908c75a9..004495d7baff0d8e850b3fdcc0e8641329a1a4f0 100644 (file)
@@ -3045,6 +3045,8 @@ void wxWindow::SetFont( const wxFont &font )
     else
         m_font = *wxSWISS_FONT;
 
+    if (!m_widget->window) return;
+
     wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
     if (sysbg.Red() == m_backgroundColour.Red() &&
         sysbg.Green() == m_backgroundColour.Green() &&
index 012b2c5082c2ec8e66f2ae0fe22e6459908c75a9..004495d7baff0d8e850b3fdcc0e8641329a1a4f0 100644 (file)
@@ -3045,6 +3045,8 @@ void wxWindow::SetFont( const wxFont &font )
     else
         m_font = *wxSWISS_FONT;
 
+    if (!m_widget->window) return;
+
     wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
     if (sysbg.Red() == m_backgroundColour.Red() &&
         sysbg.Green() == m_backgroundColour.Green() &&