From 0181aaf8220e21f760272796e5be2cd673b49e3b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 18 Feb 2014 15:13:04 +0000 Subject: [PATCH] Compilation fix for wxUSE_IMAGE==0 wxMSW build. Declare the variable used in any case outside of wxUSE_IMAGE-only block. See #2609. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/imaglist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp index 24f64bc4bc..37b308c7fd 100644 --- a/src/msw/imaglist.cpp +++ b/src/msw/imaglist.cpp @@ -142,6 +142,7 @@ bool wxImageList::GetSize(int WXUNUSED(index), int &width, int &height) const int wxImageList::Add(const wxBitmap& bitmap, const wxBitmap& mask) { HBITMAP hbmp; + bool useMask; #if wxUSE_WXDIB && wxUSE_IMAGE // wxBitmap normally stores alpha in pre-multiplied format but @@ -150,7 +151,6 @@ int wxImageList::Add(const wxBitmap& bitmap, const wxBitmap& mask) // course, very inefficient but it's better than wrong appearance so we do // this for now until a better way can be found. AutoHBITMAP hbmpRelease; - bool useMask; if ( bitmap.HasAlpha() ) { wxImage img = bitmap.ConvertToImage();