mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(svn r22069) -Fix: delete all savegame packets, not just the first one
This commit is contained in:
parent
adfd648031
commit
a19bc28aba
@ -178,14 +178,18 @@ ServerNetworkGameSocketHandler::~ServerNetworkGameSocketHandler()
|
||||
OrderBackup::ResetUser(this->client_id);
|
||||
|
||||
if (this->savegame_mutex != NULL) this->savegame_mutex->BeginCritical();
|
||||
delete this->savegame_packets;
|
||||
if (this->savegame != NULL) this->savegame->cs = NULL;
|
||||
|
||||
if (this->savegame_mutex != NULL) this->savegame_mutex->EndCritical();
|
||||
|
||||
/* Make sure the saving is completely cancelled. */
|
||||
if (this->savegame != NULL) WaitTillSaved();
|
||||
|
||||
while (this->savegame_packets != NULL) {
|
||||
Packet *p = this->savegame_packets->next;
|
||||
delete this->savegame_packets;
|
||||
this->savegame_packets = p;
|
||||
}
|
||||
|
||||
delete this->savegame_mutex;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user