diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt index 5e2321e24..e6f646ef1 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bazaar/BazaarDataHolder.kt @@ -48,8 +48,13 @@ class BazaarDataHolder { fun getData(internalName: String) = bazaarData[internalName] ?: createNewData(internalName) - private fun createNewData(internalName: String): BazaarData { - val displayName = NEUItems.getItemStack(internalName).name!!.removeColor() + private fun createNewData(internalName: String): BazaarData? { + val stack = NEUItems.getItemStackOrNull(internalName) + if (stack == null) { + LorenzUtils.debug("Bazaar data is null: '$internalName'") + return null + } + val displayName = stack.name!!.removeColor() val sellPrice = NEUItems.getPrice(internalName, true) val buyPrice = NEUItems.getPrice(internalName, false) val npcPrice = npcPrices[internalName].let { |