From cd6154cae64acd5eaf996d653798daa413e7a915 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 22 Jul 2018 10:55:09 +0200 Subject: [PATCH] fix the lighthouse crash in preview. --- scripts/eressea/xmasitems.lua | 2 -- src/kernel/save.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/eressea/xmasitems.lua b/scripts/eressea/xmasitems.lua index 9e22dea52..a0f2e48f8 100644 --- a/scripts/eressea/xmasitems.lua +++ b/scripts/eressea/xmasitems.lua @@ -99,8 +99,6 @@ function self.update() r:set_resource("tree", trees * 1.1) msg:send_region(r) end - if clear then - end end end else diff --git a/src/kernel/save.c b/src/kernel/save.c index b43d9bd5d..b51e82734 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -1493,7 +1493,9 @@ int read_game(gamedata *data) if (r->flags & RF_LIGHTHOUSE) { building *b; for (b = r->buildings; b; b = b->next) { - update_lighthouse(b); + if (is_lighthouse(b->type)) { + update_lighthouse(b); + } } } }