diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-06-05 00:03:44 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-06-05 00:03:44 +0000 |
commit | bc3d8d5ecec975b6a3da720bd03e174da84c7fac (patch) | |
tree | 5c92cded925c68dee33d336d2a21f4cf4afc3d91 | |
parent | 1751baeed66d28278fd1153d2c91cfff1eb8004f (diff) | |
download | Essentials-bc3d8d5ecec975b6a3da720bd03e174da84c7fac.tar Essentials-bc3d8d5ecec975b6a3da720bd03e174da84c7fac.tar.gz Essentials-bc3d8d5ecec975b6a3da720bd03e174da84c7fac.tar.lz Essentials-bc3d8d5ecec975b6a3da720bd03e174da84c7fac.tar.xz Essentials-bc3d8d5ecec975b6a3da720bd03e174da84c7fac.zip |
NPE fix for offline users in UserData
That one was correct, otherwise the inventory will be deleted by offline changes.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1585 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/UserData.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index dc3115590..8261ba7a9 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -324,7 +324,7 @@ public abstract class UserData extends PlayerExtension implements IConf private ItemStack[] _getSavedInventory() { int size = config.getInt("inventory.size", 0); - if (getInventory() == null || size < 1 || size > getInventory().getSize()) + if (getInventory() != null && (size < 1 || size > getInventory().getSize())) { return null; } |