From 560466e3ef1806d81d860b171a39546ec6c114c0 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 18 May 2024 10:55:06 -0500 Subject: [PATCH] null check --- src/engine/objects/RuneBaseEffect.java | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/engine/objects/RuneBaseEffect.java b/src/engine/objects/RuneBaseEffect.java index ce4ddfce..57321b0e 100644 --- a/src/engine/objects/RuneBaseEffect.java +++ b/src/engine/objects/RuneBaseEffect.java @@ -34,17 +34,19 @@ public class RuneBaseEffect extends AbstractGameObject { this.name = rs.getString("name"); RuneBase rb = RuneBase.getRuneBase(rs.getInt("runeID")); - switch (rb.getName()) { - case "Born of the Ethyri": - case "Born of the Taripontor": - case "Born of the Gwendannen": - case "Born of the Invorri": - case "Born of the Irydnu": - this.amount = 0; - break; - default: - this.amount = rs.getShort("amount"); - this.runeBaseID = rs.getInt("runeID"); + if(rb != null) { + switch (rb.getName()) { + case "Born of the Ethyri": + case "Born of the Taripontor": + case "Born of the Gwendannen": + case "Born of the Invorri": + case "Born of the Irydnu": + this.amount = 0; + break; + default: + this.amount = rs.getShort("amount"); + this.runeBaseID = rs.getInt("runeID"); + } } } /*