git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43660
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
desc.width = size.x;
desc.height = size.y;
m_dfbwin = layer->CreateWindow(&desc);
- if ( !layer )
+ if ( !m_dfbwin )
return false;
// add the new TLW to DFBWindowID->wxTLW map:
wxDELETE(m_toPaint);
+ if ( !m_dfbwin )
+ return;
+
// remove the TLW from DFBWindowID->wxTLW map:
DFBWindowID winid;
if ( m_dfbwin->GetID(&winid) )
gs_dfbWindowsMap.erase(winid);
+
+ m_dfbwin->Destroy();
+ m_dfbwin.Reset();
}
// ----------------------------------------------------------------------------