Fix client crashing when font texture isn't 32bpp, closes #168. (Thanks AndrewPH)

This commit is contained in:
UnknownShadow200 2016-04-14 22:52:13 +10:00
parent 93c35029a3
commit 0e6f529303

View File

@ -97,6 +97,8 @@ namespace ClassicalSharp.TexturePack {
void SetFontBitmap( Game game, Stream stream ) {
Bitmap bmp = Platform.ReadBmp( stream );
if( !FastBitmap.CheckFormat( bmp.PixelFormat ) )
game.Drawer2D.ConvertTo32Bpp( ref bmp );
game.Drawer2D.SetFontBitmap( bmp );
game.Events.RaiseChatFontChanged();
}