summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-03-10 02:01:59 +0000
committerKHobbits <rob@khobbits.co.uk>2013-03-10 02:01:59 +0000
commit9ff0571cea321add3881c069a5c5744a2b5f81b0 (patch)
tree61f3c81c3dc274ac6a841be7b86a87f396e24063
parentfc019af9f60fd3dc9df8d7fbfc2191a54053fc18 (diff)
downloadEssentials-9ff0571cea321add3881c069a5c5744a2b5f81b0.tar
Essentials-9ff0571cea321add3881c069a5c5744a2b5f81b0.tar.gz
Essentials-9ff0571cea321add3881c069a5c5744a2b5f81b0.tar.lz
Essentials-9ff0571cea321add3881c069a5c5744a2b5f81b0.tar.xz
Essentials-9ff0571cea321add3881c069a5c5744a2b5f81b0.zip
Protect us from npe.
-rw-r--r--Essentials/src/com/earth2me/essentials/MetaItemStack.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/MetaItemStack.java b/Essentials/src/com/earth2me/essentials/MetaItemStack.java
index 9f413f8c7..ce6fda454 100644
--- a/Essentials/src/com/earth2me/essentials/MetaItemStack.java
+++ b/Essentials/src/com/earth2me/essentials/MetaItemStack.java
@@ -347,7 +347,7 @@ public class MetaItemStack
if (split[0].equalsIgnoreCase("effect") || (allowShortName && split[0].equalsIgnoreCase("e")))
{
pEffectType = Potions.getByName(split[1]);
- if (pEffectType != null)
+ if (pEffectType != null && pEffectType.getName() != null)
{
if (hasMetaPermission(sender, "potions." + pEffectType.getName().toLowerCase(), false, false, ess))
{