X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e29e19e7e9f74a2106f4cc0186f7b4f208521bd..228146b08230df0b1d1e8c52783d9322ae74ad4a:/src/msw/dib.cpp diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index f56dae0b1f..66ebda4954 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -634,7 +634,7 @@ wxPalette *wxDIB::CreatePalette() const // and the colour table wxCharBuffer rgb(sizeof(RGBQUAD) * biClrUsed); RGBQUAD *pRGB = (RGBQUAD*)rgb.data(); - SelectInHDC(hDC, m_handle); + SelectInHDC selectHandle(hDC, m_handle); ::GetDIBColorTable(hDC, 0, biClrUsed, pRGB); for ( DWORD i = 0; i < biClrUsed; i++, pRGB++ ) {