summaryrefslogtreecommitdiff
path: root/src/network/network_gamelist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/network_gamelist.cpp')
-rw-r--r--src/network/network_gamelist.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index 3e6db1317..707c5c36b 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -182,17 +182,22 @@ void NetworkAfterNewGRFScan()
/* Don't know the GRF, so mark game incompatible and the (possibly)
* already resolved name for this GRF (another server has sent the
* name of the GRF already */
- AddGRFTextToList(&c->name, FindUnknownGRFName(c->ident.grfid, c->ident.md5sum, true));
+ c->name->Release();
+ c->name = FindUnknownGRFName(c->ident.grfid, c->ident.md5sum, true);
+ c->name->AddRef();
c->status = GCS_NOT_FOUND;
/* If we miss a file, we're obviously incompatible */
item->info.compatible = false;
} else {
- c->filename = f->filename;
- CleanUpGRFText(c->name);
- c->name = DuplicateGRFText(f->name);
- c->info = f->info;
- c->status = GCS_UNKNOWN;
+ c->filename = f->filename;
+ c->name->Release();
+ c->name = f->name;
+ c->name->AddRef();
+ c->info->Release();
+ c->info = f->info;
+ c->info->AddRef();
+ c->status = GCS_UNKNOWN;
}
}
}