Skip to content

Commit

Permalink
Avoid starting if init.txt or keybinds.txt failed to load
Browse files Browse the repository at this point in the history
Fixes a crash if the entire stonesense folder is missing:
https://www.reddit.com/r/dwarffortress/comments/7r6v7k/_/dsutxso/
  • Loading branch information
lethosor committed Jan 18, 2018
1 parent 4c55e14 commit 455b51a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,10 @@ static void * stonesense_thread(ALLEGRO_THREAD * main_thread, void * parms)
ssTimers.prev_frame_time = clock();
ssTimers.frame_total = 1.0f;
initRandomCube();
loadConfigFile();
loadKeymapFile();
if (!loadConfigFile() || !loadKeymapFile()) {
stonesense_started = 0;
return NULL;
}
init_masks();
if(!loadfont(out)) {
stonesense_started = 0;
Expand Down

0 comments on commit 455b51a

Please sign in to comment.