Make sure to always convert to plain bitmap.

--HG--
branch : gsoc2014-dfighter
This commit is contained in:
dfighter1985 2014-07-05 03:31:21 +02:00
parent 1dee9d232b
commit 6119f2c480

View file

@ -55,6 +55,11 @@ void TextureChooser::onCurrentRowChanged( int row )
NLMISC::CBitmap bm;
uint8 depth = bm.load( f );
f.close();
b = bm.convertToType( NLMISC::CBitmap::RGBA );
if( !b )
{
return;
}
uint32 size = bm.getSize() * ( 32 / 8 ); // should be depth, but CBitmap always uses 32 bit to store the image