Added the same NULL check to the generic Bukkit unwrapper.

This commit is contained in:
Kristian S. Stangeland 2012-10-12 00:01:05 +02:00
parent 57add8e26f
commit 768d169f27

View File

@ -45,8 +45,10 @@ public class BukkitUnwrapper implements Unwrapper {
@Override
public Object unwrapItem(Object wrappedObject) {
// Special case
if (wrappedObject instanceof Collection) {
// Special cases
if (wrappedObject == null) {
return null;
} else if (wrappedObject instanceof Collection) {
return handleCollection((Collection<Object>) wrappedObject);
}