(svn r16220) -Fix [FS#2862]: possible crashes when quiting OpenTTD or forcing resizes/redraws of the screen during map generation
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#include "elrail_func.h"
|
||||
#include "rev.h"
|
||||
#include "highscore.h"
|
||||
#include "thread.h"
|
||||
|
||||
#include "newgrf_commons.h"
|
||||
|
||||
@@ -655,6 +656,10 @@ int ttd_main(int argc, char *argv[])
|
||||
InitializeGUI();
|
||||
IConsoleCmdExec("exec scripts/autoexec.scr 0");
|
||||
|
||||
/* Take our initial lock on whatever we might want to do! */
|
||||
_genworld_paint_mutex->BeginCritical();
|
||||
_genworld_mapgen_mutex->BeginCritical();
|
||||
|
||||
GenerateWorld(GW_EMPTY, 64, 64); // Make the viewport initialization happy
|
||||
WaitTillGeneratedWorld();
|
||||
|
||||
|
Reference in New Issue
Block a user