fix container update item

This commit is contained in:
Henrique Santiago
2012-01-20 02:27:36 -02:00
parent f21927e8d9
commit b17cc43fc6
2 changed files with 7 additions and 1 deletions

View File

@@ -369,7 +369,12 @@ int Game::getThingStackpos(const ThingPtr& thing)
// thing is at map
if(thing->getPos().x != 65535) {
TilePtr tile = g_map.getTile(thing->getPos());
return tile->getThingStackpos(thing);
if(tile)
return tile->getThingStackpos(thing);
else {
logError("could not get tile");
return -1;
}
}
// thing is at container or inventory