diff options
author | Reid <reidyaro@gmail.com> | 2011-08-24 22:42:17 +0200 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2011-08-24 22:42:17 +0200 |
commit | 43c19a8321bd0c4bcf36655d74e895397aff7eea (patch) | |
tree | c8f7933367ae1e757a3166a04772274896d58c9c /src/inventory.cpp | |
parent | c1ec2b921389cb5c44d9ae572ea4851891cf8bc9 (diff) | |
parent | 9505e3789cc9db6a10a68b9794a586604271b76f (diff) | |
download | mv-43c19a8321bd0c4bcf36655d74e895397aff7eea.tar.gz mv-43c19a8321bd0c4bcf36655d74e895397aff7eea.tar.bz2 mv-43c19a8321bd0c4bcf36655d74e895397aff7eea.tar.xz mv-43c19a8321bd0c4bcf36655d74e895397aff7eea.zip |
Merge branch 'master' of gitorious.org:manaplus/manaplus
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index 3ff40374a..f907b2cc2 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -22,7 +22,7 @@ #include "inventory.h" #include "item.h" -#include "log.h" +#include "logger.h" #include "net/inventoryhandler.h" #include "net/net.h" @@ -155,6 +155,9 @@ void Inventory::removeItemAt(int index) bool Inventory::contains(Item *item) const { + if (!item) + return false; + for (unsigned i = 0; i < mSize; i++) { if (mItems[i] && mItems[i]->getId() == item->getId()) |