Alexandre Julliard : gdi32: Update the ref count of stock objects when deleting a DC.

Alexandre Julliard julliard at winehq.org
Mon Oct 22 13:42:44 CDT 2012


Module: wine
Branch: master
Commit: b0ba7c765e3002eda3e1286c9e2cc502ea6b6a2b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b0ba7c765e3002eda3e1286c9e2cc502ea6b6a2b

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sun Oct 21 12:18:46 2012 +0200

gdi32: Update the ref count of stock objects when deleting a DC.

---

 dlls/gdi32/dc.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c
index 8d4cde0..be9b016 100644
--- a/dlls/gdi32/dc.c
+++ b/dlls/gdi32/dc.c
@@ -162,6 +162,10 @@ void free_dc_ptr( DC *dc )
         dc->physDev = physdev->next;
         physdev->funcs->pDeleteDC( physdev );
     }
+    GDI_dec_ref_count( dc->hPen );
+    GDI_dec_ref_count( dc->hBrush );
+    GDI_dec_ref_count( dc->hFont );
+    if (dc->hBitmap) GDI_dec_ref_count( dc->hBitmap );
     free_gdi_handle( dc->hSelf );
     free_dc_state( dc );
 }




More information about the wine-cvs mailing list