Check for null return value in wxClientDC constructor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f4bd67593e
commit
7882729eb5
@ -85,6 +85,8 @@ wxClientDC::wxClientDC()
|
||||
wxClientDC::wxClientDC(wxWindow *window)
|
||||
{
|
||||
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
|
||||
if (!rootwindow)
|
||||
return;
|
||||
WindowRef windowref = (WindowRef) rootwindow->MacGetWindowRef() ;
|
||||
wxPoint origin = window->GetClientAreaOrigin() ;
|
||||
wxSize size = window->GetClientSize() ;
|
||||
|
@ -85,6 +85,8 @@ wxClientDC::wxClientDC()
|
||||
wxClientDC::wxClientDC(wxWindow *window)
|
||||
{
|
||||
wxTopLevelWindowMac* rootwindow = window->MacGetTopLevelWindow() ;
|
||||
if (!rootwindow)
|
||||
return;
|
||||
WindowRef windowref = (WindowRef) rootwindow->MacGetWindowRef() ;
|
||||
wxPoint origin = window->GetClientAreaOrigin() ;
|
||||
wxSize size = window->GetClientSize() ;
|
||||
|
Loading…
Reference in New Issue
Block a user