fixing return values and handling of invalid files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f63c36c378
commit
346662b87a
@ -334,7 +334,7 @@ bool wxIcon::LoadFile(
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true ;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxIcon::CopyFromBitmap( const wxBitmap& bmp )
|
||||
@ -353,9 +353,11 @@ bool wxICONResourceHandler::LoadFile(
|
||||
int desiredWidth, int desiredHeight )
|
||||
{
|
||||
wxIcon icon ;
|
||||
icon.LoadFile( name , wxBITMAP_TYPE_ICON_RESOURCE , desiredWidth , desiredHeight ) ;
|
||||
bitmap->CopyFromIcon( icon ) ;
|
||||
|
||||
return bitmap->Ok() ;
|
||||
if ( icon.LoadFile( name , wxBITMAP_TYPE_ICON_RESOURCE , desiredWidth , desiredHeight ) )
|
||||
{
|
||||
bitmap->CopyFromIcon( icon ) ;
|
||||
return bitmap->Ok() ;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user