Index: src/server/psserverchar.cpp =================================================================== --- src/server/psserverchar.cpp (revision 5686) +++ src/server/psserverchar.cpp (working copy) @@ -1795,8 +1795,11 @@ { //put back in storage character->Inventory().AddStorageItem(currentitem); - currentitem->SetLocInParent(PSCHARACTER_SLOT_STORAGE); - currentitem->Save(false); + if (currentitem) + { + currentitem->SetLocInParent(PSCHARACTER_SLOT_STORAGE); + currentitem->Save(false); + } if (newcount != count) // not enough empty or stackable slots psserver->SendSystemError(client->GetClientNum(),"You're carrying too many items [%d/%d] the rest was put back in storage.", newcount, count); @@ -1874,8 +1877,11 @@ //move item to player storage character->Inventory().AddStorageItem(item); - item->SetLocInParent(PSCHARACTER_SLOT_STORAGE); - item->Save(false); + if (item) + { + item->SetLocInParent(PSCHARACTER_SLOT_STORAGE); + item->Save(false); + } psserver->SendSystemOK(client->GetClientNum(), "You've stored %d %s.", count, itemName.GetData()); Index: src/server/bulkobjects/pscharinventory.cpp =================================================================== --- src/server/bulkobjects/pscharinventory.cpp (revision 5686) +++ src/server/bulkobjects/pscharinventory.cpp (working copy) @@ -368,6 +368,7 @@ if (storedItem->CheckStackableWith(item, true, true)) // item fits completely { storedItem->CombineStack(item); + storedItem->Save(false); item = NULL; return; } @@ -375,7 +376,10 @@ { psItem * split = item->SplitStack(MAX_STACK_COUNT - storedItem->GetStackCount()); if (split) + { storedItem->CombineStack(split); + storedItem->Save(false); + } } } }