1
0

Fixed forgotten error checking

This commit is contained in:
Tycho 2014-08-13 12:10:21 +01:00
parent 8f0c4911f7
commit 8f7b9acb48

View File

@ -324,7 +324,11 @@ void cCraftingRecipes::LoadRecipes(void)
return;
}
AString Everything;
f.ReadRestOfFile(Everything);
if (!f.ReadRestOfFile(Everything))
{
LOGWARNING("Cannot read file \"crafting.txt\", no crafting recipes will be available!");
return;
}
f.Close();
// Split it into lines, then process each line as a single recipe: