1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 02:12:45 +01:00

Fix crash if there is no player object

This commit is contained in:
Daniel Evans 2016-04-16 14:06:54 +01:00
parent 76eb43c023
commit 8575408ca2

View File

@ -196,8 +196,10 @@ void drawPlayerInfo(PlayerController* player, GameWorld* world, GameRenderer* re
void drawHUD(ViewCamera& currentView, PlayerController* player, GameWorld* world, GameRenderer* render)
{
drawMap(currentView, player, world, render);
drawPlayerInfo(player, world, render);
if(player && player->getCharacter()) {
drawMap(currentView, player, world, render);
drawPlayerInfo(player, world, render);
}
}
void drawOnScreenText(GameWorld* world, GameRenderer* renderer)