X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/327972e7b61eed1feb5a306c816541c2e0d2d301..f31c06b39e4eaff67776ab2e823a83f924d7a145:/src/common/image.cpp diff --git a/src/common/image.cpp b/src/common/image.cpp index a3a5f0ada6..5d65ecaa9c 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -2254,7 +2254,7 @@ static wxImage LoadImageFromResource(const wxString &name, wxBitmapType type) if ( type == wxBITMAP_TYPE_BMP_RESOURCE ) { - hBitmap = ::LoadBitmap(wxGetInstance(), name.t_str()); + hBitmap.Init( ::LoadBitmap(wxGetInstance(), name.t_str()) ); if ( !hBitmap ) { @@ -2278,8 +2278,8 @@ static wxImage LoadImageFromResource(const wxString &name, wxBitmapType type) return wxImage(); } - hBitmap = info.hbmColor; - hMask = info.hbmMask; + hBitmap.Init(info.hbmColor); + hMask.Init(info.hbmMask); } } else if ( type == wxBITMAP_TYPE_CUR_RESOURCE )