Add a null check to avoid a NullPointerException when the query returns null.
This commit is contained in:
@@ -192,7 +192,7 @@ public class RunecraftPlugin extends Plugin
|
|||||||
);
|
);
|
||||||
|
|
||||||
Item[] items = queryRunner.runQuery(inventoryQuery);
|
Item[] items = queryRunner.runQuery(inventoryQuery);
|
||||||
degradedPouchInInventory = items.length > 0;
|
degradedPouchInInventory = items != null && items.length > 0;
|
||||||
|
|
||||||
if (degradedPouchInInventory)
|
if (degradedPouchInInventory)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user