Imagelist fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ChangeLog
  Use DeleteDC instead of DeleteObject to free HDCs
  (spotted by Dietrich Teickner <Dietrich_Teickner@t-online.de>)
  Clear the imagelist structure on deletion, as some stupid
  apps free imagelists multiple times.

Index: dlls/comctl32/imagelist.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/imagelist.c,v
retrieving revision 1.66
diff -u -r1.66 imagelist.c
--- dlls/comctl32/imagelist.c	11 Nov 2002 22:19:42 -0000	1.66
+++ dlls/comctl32/imagelist.c	17 Nov 2002 00:31:43 -0000
@@ -694,6 +694,7 @@
     if (himl->hbrBlend50)
         DeleteObject (himl->hbrBlend50);
 
+    ZeroMemory(himl, sizeof(*himl));
     COMCTL32_Free (himl);
 
     return TRUE;
@@ -1223,9 +1224,9 @@
 cleanup:
     DeleteObject(hBlendMaskBmp);
     DeleteObject(hImageBmp);
-    DeleteObject(hImageDC);
-    DeleteObject(hImageListDC);
-    DeleteObject(hMaskListDC);
+    DeleteDC(hImageDC);
+    DeleteDC(hImageListDC);
+    DeleteDC(hMaskListDC);
 
     return bResult;
 }


-- 
Dimi.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux