git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58003 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 /////////////////////////////////////////////////////////////////////////////
 // Name:        src/gtk/dcclient.cpp
-// Purpose:
+// Purpose:     wxWindowDCImpl implementation
 // Author:      Robert Roebling
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Robert Roebling, Chris Breeze
     if ( !widget )
     {
         window = window->GetParent();
-        widget = window->m_wxwindow;
+        if (window)
+            widget = window->m_wxwindow;
     }
 
     wxASSERT_MSG( widget, wxT("DC needs a widget") );