summaryrefslogtreecommitdiff
path: root/src/net/eathena/auctionhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-25 23:58:16 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 23:58:16 +0300
commit482782d74c61e226ed1ce81700708244565291f5 (patch)
treec955925952f091cdc71af8b1e7f8b3cdabecfa6b /src/net/eathena/auctionhandler.cpp
parentee12c6e77bd4d34d5fa682361127add32cc1a184 (diff)
downloadmv-482782d74c61e226ed1ce81700708244565291f5.tar.gz
mv-482782d74c61e226ed1ce81700708244565291f5.tar.bz2
mv-482782d74c61e226ed1ce81700708244565291f5.tar.xz
mv-482782d74c61e226ed1ce81700708244565291f5.zip
Add missing checks into net directory.
Diffstat (limited to 'src/net/eathena/auctionhandler.cpp')
-rw-r--r--src/net/eathena/auctionhandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/eathena/auctionhandler.cpp b/src/net/eathena/auctionhandler.cpp
index 586e276b8..7522ec491 100644
--- a/src/net/eathena/auctionhandler.cpp
+++ b/src/net/eathena/auctionhandler.cpp
@@ -139,6 +139,8 @@ void AuctionHandler::cancelReg() const
void AuctionHandler::setItem(const Item *const item,
const int amount) const
{
+ if (!item)
+ return;
createOutPacket(CMSG_AUCTION_SET_ITEM);
outMsg.writeInt16(static_cast<int16_t>(
item->getInvIndex() + INVENTORY_OFFSET), "index");