]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/imaglist.cpp
Fix memory leak by letting the base class version handle the
[wxWidgets.git] / src / msw / imaglist.cpp
index c31e18afbe378c1f03f12f0190a8de58e536bda4..42db9c19861ab0603e6cd7ad44e4ba40cca0b1a5 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     04/01/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -264,10 +264,10 @@ bool wxImageList::Draw(int index,
     COLORREF clr = CLR_NONE;    // transparent by default
     if ( solidBackground )
     {
-        wxBrush *brush = & dc.GetBackground();
-        if ( brush && brush->Ok() )
+        const wxBrush& brush = dc.GetBackground();
+        if ( brush.Ok() )
         {
-            clr = wxColourToRGB(brush->GetColour());
+            clr = wxColourToRGB(brush.GetColour());
         }
     }
 
@@ -327,7 +327,7 @@ static HBITMAP GetMaskForImage(const wxBitmap& bitmap, const wxBitmap& mask)
         hbmpMask = (HBITMAP)pMask->GetMaskBitmap();
     }
 
-    // windows mask convention is opposite to the wxWindows one
+    // windows mask convention is opposite to the wxWidgets one
     HBITMAP hbmpMaskInv = wxInvertMask(hbmpMask);
 
     if ( deleteMask )