From e622cc3f18e09e72b70365f2de33ab57d0f2fa29 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 2 Jan 2015 16:15:52 +0000 Subject: [PATCH] Delete wxDC object when exiting from wxPropertyGrid::OnPaint git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/propgrid.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 8a072876ab..59941d159b 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -1860,7 +1860,10 @@ void wxPropertyGrid::OnPaint( wxPaintEvent& WXUNUSED(event) ) // Don't paint after destruction has begun if ( !HasInternalFlag(wxPG_FL_INITIALIZED) ) + { + delete dcPtr; return; + } // Find out where the window is scrolled to int vx,vy; // Top left corner of client