From 66cb496cf767b1743fd5fffa763b5563988c4a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Heredero?= Date: Tue, 14 Jun 2022 05:28:43 +0200 Subject: [PATCH] bug fix done --- src/Screen/ScreenBattle.java | 4 +++- src/Screen/ScreenPlayer.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Screen/ScreenBattle.java b/src/Screen/ScreenBattle.java index e0176b6..2d638d9 100644 --- a/src/Screen/ScreenBattle.java +++ b/src/Screen/ScreenBattle.java @@ -75,7 +75,9 @@ public class ScreenBattle extends RenderingScreen{ g.drawFilledRectangle(Settings.SIDE/2, HEIGHT_DIALOG/2 + EDGE, WIDTH_DIALOG, HEIGHT_DIALOG, 0); //dialog - if(b != null) g.drawString(15, 245 ,b.getLine() , optimus40); + if(b == null) return; + if(b.getLine() == null) return; + g.drawString(15, 245 ,b.getLine() , optimus40); diff --git a/src/Screen/ScreenPlayer.java b/src/Screen/ScreenPlayer.java index 62a4a81..5558274 100644 --- a/src/Screen/ScreenPlayer.java +++ b/src/Screen/ScreenPlayer.java @@ -35,7 +35,7 @@ public class ScreenPlayer { if(sb != null){ sb.setBattle(b); - + b.setEnemy(e); } screenManager.render(g);