reverting part of r58797, otherwise wxClientDC get no graphics context at all
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2756,7 +2756,8 @@ wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContext( const wxWindowDC&
|
|||||||
if (win_impl->GetWindow())
|
if (win_impl->GetWindow())
|
||||||
cgctx = (CGContextRef)(win_impl->GetWindow()->MacGetCGContextRef());
|
cgctx = (CGContextRef)(win_impl->GetWindow()->MacGetCGContextRef());
|
||||||
|
|
||||||
if (cgctx != 0)
|
// having a cgctx being NULL is fine (will be created on demand)
|
||||||
|
// this is the case for all wxWindowDCs except wxPaintDC
|
||||||
return new wxMacCoreGraphicsContext( this, cgctx, (wxDouble) w, (wxDouble) h );
|
return new wxMacCoreGraphicsContext( this, cgctx, (wxDouble) w, (wxDouble) h );
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user