]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dcbuffer.h
Let wxMiniFrame have the same default flags under wxGTK
[wxWidgets.git] / include / wx / dcbuffer.h
index 5b553769b70687d2505f472939671b59cf20fcfc..1b12cc6f055f47b01df3bb03cd50c75a2a850fcd 100644 (file)
@@ -122,13 +122,13 @@ private:
     void InitCommon(wxDC *dc, int style)
     {
         wxASSERT_MSG( !m_dc, _T("wxBufferedDC already initialised") );
-        wxCHECK_RET( dc, _T("can't associate NULL DC with wxBufferedDC") );
 
         m_dc = dc;
         m_style = style;
 
         // inherit the same layout direction as the original DC
-        SetLayoutDirection(dc->GetLayoutDirection());
+        if (dc && dc->IsOk())
+            SetLayoutDirection(dc->GetLayoutDirection());
     }
 
     // check that the bitmap is valid and use it