]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed resource leak in CreateIconFromBitmap() (Dimitri)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jan 2002 01:25:09 +0000 (01:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jan 2002 01:25:09 +0000 (01:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/icon.cpp

index 8f27b61324cc5c1ff31636b0591e08296c2a4a04..4e6eccd2359e0258bb1ef6a1ce76f4787ab920c4 100644 (file)
@@ -143,6 +143,9 @@ void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
         // we created the mask, now delete it
         delete mask;
     }
+
+    // delete the inverted mask bitmap we created as well
+    ::DeleteObject(iconInfo.hbmMask);
 #else // Win16
     // there are some functions in curico.cpp which probably could be used
     // here...