]> git.saurik.com Git - wxWidgets.git/commitdiff
crash fixes for wxAuiNotebook on gtk
authorBenjamin Williams <bwilliams@kirix.com>
Wed, 8 Nov 2006 10:36:16 +0000 (10:36 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Wed, 8 Nov 2006 10:36:16 +0000 (10:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/auibook.cpp

index f2ed26ae883af506ef603ab0d9be9e1f442a14e4..c9dd3278738657b9c9ae5e75e6e184a2cb95d24e 100644 (file)
@@ -1403,6 +1403,9 @@ void wxAuiTabContainer::SetTabOffset(size_t offset)
 // provide custom drawing capabilities
 void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd)
 {
+    if (!raw_dc || !raw_dc->IsOk())
+        return;
+
     wxMemoryDC dc;
     wxBitmap bmp;
     size_t i;
@@ -1413,6 +1416,8 @@ void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd)
     bmp.Create(m_rect.GetWidth(), m_rect.GetHeight());
     dc.SelectObject(bmp);
 
+    if (!dc.IsOk())
+        return;
 
     // find out if size of tabs is larger than can be
     // afforded on screen