From 322512d0cbef4faa47e94bcf7120574dddd95482 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 19 Jul 2009 06:46:52 +0000 Subject: [PATCH] warning about scripts small crashfix in autoseed --- src/common/modules/autoseed.c | 2 +- src/scripts/eressea.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/common/modules/autoseed.c b/src/common/modules/autoseed.c index e8dd52d18..c1572de08 100644 --- a/src/common/modules/autoseed.c +++ b/src/common/modules/autoseed.c @@ -1022,7 +1022,7 @@ build_island_e3(int x, int y, int numfactions, int minsize) prepare_starting_region(r); } r->land->money = 50000; /* 2% = 1000 silver */ - } else { + } else if (r->land) { r->land->money *= 4; } } diff --git a/src/scripts/eressea.lua b/src/scripts/eressea.lua index 507544040..844f40979 100644 --- a/src/scripts/eressea.lua +++ b/src/scripts/eressea.lua @@ -50,6 +50,10 @@ end function process(orders) -- initialize starting equipment for new players + if open_game==nil then + print("did you load default.lua?") + return -1 + end if open_game(get_turn())~=0 then print("could not read game")