Skip to content

Commit

Permalink
Merge pull request runelite#2578 from ypperlig/fightcavesoverlayfix
Browse files Browse the repository at this point in the history
Clear previous image components in fight caves overlay
  • Loading branch information
deathbeam authored May 11, 2018
2 parents 36d9758 + 5d35ded commit 78f7a2a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ public class FightCaveOverlay extends Overlay
public Dimension render(Graphics2D graphics)
{
JadAttack attack = plugin.getAttack();

if (attack == null)
{
return null;
}

BufferedImage prayerImage = getPrayerImage(attack);

imagePanelComponent.getChildren().clear();
imagePanelComponent.getChildren().add(new ImageComponent(prayerImage));

if (!client.isPrayerActive(attack.getPrayer()))
Expand Down

0 comments on commit 78f7a2a

Please sign in to comment.