diff --git a/src/battle/battle.c b/src/battle/battle.c index 03c2c03..2a5f998 100644 --- a/src/battle/battle.c +++ b/src/battle/battle.c @@ -157,8 +157,11 @@ static void draw(void) { prepareScene(); - battle.camera.x = player->x - (SCREEN_WIDTH / 2); - battle.camera.y = player->y - (SCREEN_HEIGHT / 2); + if (player != NULL) + { + battle.camera.x = player->x - (SCREEN_WIDTH / 2); + battle.camera.y = player->y - (SCREEN_HEIGHT / 2); + } drawBackground(battle.background);