diff options
Diffstat (limited to 'src/rollback_interface.cpp')
-rw-r--r-- | src/rollback_interface.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rollback_interface.cpp b/src/rollback_interface.cpp index 70a9e9457..808b07fed 100644 --- a/src/rollback_interface.cpp +++ b/src/rollback_interface.cpp @@ -340,7 +340,13 @@ bool RollbackAction::applyRevert(Map *map, InventoryManager *imgr, IGameDef *gam if(n_old.meta != ""){ if(!meta){ meta = new NodeMetadata(gamedef); - map->setNodeMetadata(p, meta); + if(!map->setNodeMetadata(p, meta)){ + delete meta; + infostream<<"RollbackAction::applyRevert(): " + <<"setNodeMetadata failed at " + <<PP(p)<<" for "<<n_old.name<<std::endl; + return false; + } } std::istringstream is(n_old.meta, std::ios::binary); meta->deSerialize(is); |