From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Wed, 5 May 2004 21:45:36 +0000 (+0000)
Subject: don't use non-const wxDC::GetBackground() which doesn't exist any more
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b33576e16470f873bd9a2f2fbbbd09c4c5c1da34

don't use non-const wxDC::GetBackground() which doesn't exist any more


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp
index c31e18afbe..e0a5d3a76e 100644
--- a/src/msw/imaglist.cpp
+++ b/src/msw/imaglist.cpp
@@ -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());
         }
     }