# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1594952939 0 # Node ID 821f7d3a2e90e689ec070b60ca27bbdb664bc585 # Parent e7a68eea2fa02c6b66b3c2055678190d5c274337 Win: Fix compilation problems on XP with Visual C 2010. diff -r e7a68eea2fa0 -r 821f7d3a2e90 win/dw.c --- a/win/dw.c Fri Jul 17 01:30:13 2020 +0000 +++ b/win/dw.c Fri Jul 17 02:28:59 2020 +0000 @@ -936,6 +936,7 @@ { int cx = RECTWIDTH(rcClient); int cy = RECTHEIGHT(rcClient); + HBITMAP hbm; /* Define the BITMAPINFO structure used to draw text. * Note that biHeight is negative. This is done because @@ -950,8 +951,7 @@ dib.bmiHeader.biBitCount = 32; dib.bmiHeader.biCompression = BI_RGB; - HBITMAP hbm = CreateDIBSection(hdc, &dib, DIB_RGB_COLORS, NULL, NULL, 0); - if (hbm) + if((hbm = CreateDIBSection(hdc, &dib, DIB_RGB_COLORS, NULL, NULL, 0))) { HBITMAP hbmOld = (HBITMAP)SelectObject(hdcPaint, hbm); LOGFONT lgFont;