aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-07-28 14:44:18 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-07-28 14:44:18 +0300
commitfd7ec2da911ff6eeb62035ad4457f1e5179dbaa1 (patch)
treeec639502bd527e4333ab943ecfc19d6776461f56 /src
parentc9ed379e39be94b588f4b62f893760c53b2d2a4f (diff)
downloadminetest-fd7ec2da911ff6eeb62035ad4457f1e5179dbaa1.tar.gz
minetest-fd7ec2da911ff6eeb62035ad4457f1e5179dbaa1.tar.bz2
minetest-fd7ec2da911ff6eeb62035ad4457f1e5179dbaa1.zip
Fix inventory segfault when rollback recording is disabled
Diffstat (limited to 'src')
-rw-r--r--src/inventorymanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp
index 85668d645..7fc8c8ce4 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();