From: Perttu Ahola Date: Sat, 28 Jul 2012 11:44:18 +0000 (+0300) Subject: Fix inventory segfault when rollback recording is disabled X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=fd7ec2da911ff6eeb62035ad4457f1e5179dbaa1;p=zefram%2Fminetest%2Fminetest_engine.git Fix inventory segfault when rollback recording is disabled --- diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp index 85668d64..7fc8c8ce 100644 --- a/src/inventorymanager.cpp +++ b/src/inventorymanager.cpp @@ -355,7 +355,7 @@ void IMoveAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame /* Record rollback information */ - if(!ignore_rollback) + if(!ignore_rollback && gamedef->rollback()) { IRollbackReportSink *rollback = gamedef->rollback(); @@ -628,7 +628,7 @@ void IDropAction::apply(InventoryManager *mgr, ServerActiveObject *player, IGame /* Record rollback information */ - if(!ignore_src_rollback) + if(!ignore_src_rollback && gamedef->rollback()) { IRollbackReportSink *rollback = gamedef->rollback();