Add more memory safety, fix print(nil) crash

This commit is contained in:
Lion Kortlepel
2020-11-08 14:44:49 +01:00
parent b9758ddaea
commit c6fbd3dc49
5 changed files with 23 additions and 20 deletions

View File

@@ -128,7 +128,7 @@ void SyncClient(Client*c){
for (auto& client : CI->Clients) {
if(client != nullptr){
if (client.get() != c) {
for (VData *v : client->GetAllCars()) {
for (auto& v : client->GetAllCars()) {
if(v != nullptr){
Respond(c, v->Data, true);
std::this_thread::sleep_for(std::chrono::seconds(2));