X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c455ab932f89cc166fc38d3f2c2f942f6a130649..0b4c331f91428fa71510b2492345ec6d6a999c35:/src/msw/app.cpp diff --git a/src/msw/app.cpp b/src/msw/app.cpp index 6305cb017f..07a2d29ccd 100644 --- a/src/msw/app.cpp +++ b/src/msw/app.cpp @@ -234,8 +234,12 @@ bool wxApp::Initialize() LOGBRUSH lb; lb.lbStyle = BS_PATTERN; lb.lbHatch = (int)LoadBitmap( wxhInstance, "wxDISABLE_BUTTON_BITMAP" ); - wxDisableButtonBrush = ::CreateBrushIndirect( & lb ); - ::DeleteObject( (HGDIOBJ)lb.lbHatch ); + if ( lb.lbHatch ) + { + wxDisableButtonBrush = ::CreateBrushIndirect( & lb ); + ::DeleteObject( (HGDIOBJ)lb.lbHatch ); + } + //else: wxWindows resources are probably not linked in #if wxUSE_PENWINDOWS wxRegisterPenWin();