diff --git a/src/genworld.cpp b/src/genworld.cpp --- a/src/genworld.cpp +++ b/src/genworld.cpp @@ -90,7 +90,6 @@ static void CleanupGeneration() DeleteWindowById(WC_GENERATE_PROGRESS_WINDOW, 0); MarkWholeScreenDirty(); - _genworld_mapgen_mutex->EndCritical(); } /** @@ -179,6 +178,7 @@ static void _GenerateWorld(void *) IncreaseGeneratingWorldProgress(GWP_GAME_START); CleanupGeneration(); + _genworld_mapgen_mutex->EndCritical(); ShowNewGRFError();