mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 03:56:43 +00:00
(svn r17302) [0.7] -Backport from trunk:
- Fix: [NoAI] Reloading an AI started a new AI in the first available company slot causing other AIs to be started [FS#3153] (r17298) - Fix: Crash after upgrading base graphics set when opening the game options menu and you were using the upgraded set [FS#3147] (r17291) - Fix: [Squirrel] Stack was not always cleared properly with tail recursion (r17284) - Fix: [Squirrel] Calling a function that has default parameters with not enough parameters can cause a crash (r17273) - Change: Mention the MD5 checksum of the original NewGRF in the "saveload failed horribly"-error message and make it more clear that the filename is of the current NewGRF [FS#3139] (r17267)
This commit is contained in:
@@ -493,6 +493,11 @@ bool OBGFileScanner::AddFile(const char *filename, size_t basepath_length)
|
||||
/* don't allow recursive delete of all remaining items */
|
||||
duplicate->next = NULL;
|
||||
|
||||
/* If the duplicate set is currently used (due to rescanning this can happen)
|
||||
* update the currently used set to the new one. This will 'lie' about the
|
||||
* version number until a new game is started which isn't a big problem */
|
||||
if (_used_graphics_set == duplicate) _used_graphics_set = graphics;
|
||||
|
||||
DEBUG(grf, 1, "Removing %s (%i) as base graphics set (duplicate)", duplicate->name, duplicate->version);
|
||||
delete duplicate;
|
||||
ret = true;
|
||||
|
||||
Reference in New Issue
Block a user