1
0
Fork 0

Fixed forgotten error checking

This commit is contained in:
Tycho 2014-08-13 12:10:21 +01:00
parent 8f0c4911f7
commit 8f7b9acb48
1 changed files with 5 additions and 1 deletions

View File

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