Avoid crash when trying to access m_window from wxScreenDC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -191,6 +191,11 @@ void wxWindowDC::DoGetSize( int* width, int* height ) const
|
|||||||
|
|
||||||
wxBitmap wxWindowDC::DoGetAsBitmap(const wxRect *subrect) const
|
wxBitmap wxWindowDC::DoGetAsBitmap(const wxRect *subrect) const
|
||||||
{
|
{
|
||||||
|
// wxScreenDC is derived from wxWindowDC, so a screen dc will
|
||||||
|
// call this method when a Blit is performed with it as a source.
|
||||||
|
if (!m_window)
|
||||||
|
return wxNullBitmap;
|
||||||
|
|
||||||
ControlRef handle = (ControlRef) m_window->GetHandle();
|
ControlRef handle = (ControlRef) m_window->GetHandle();
|
||||||
if ( !handle )
|
if ( !handle )
|
||||||
return wxNullBitmap;
|
return wxNullBitmap;
|
||||||
|
Reference in New Issue
Block a user