mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
fix double-free when removing nonplayer TTrain
This commit is contained in:
@@ -10581,9 +10581,8 @@ void train_table::update(double dt)
|
||||
if (simulation::Train == train)
|
||||
simulation::Train = nullptr;
|
||||
}
|
||||
|
||||
// for single-player destroy non-player trains
|
||||
if (simulation::Train != train
|
||||
else if (simulation::Train != train
|
||||
&& Global.network_servers.empty() && !Global.network_client) {
|
||||
purge(train->Dynamic()->name());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user