summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-08-30 10:16:04 +0000
committeryexo <yexo@openttd.org>2010-08-30 10:16:04 +0000
commit9a05f8004bf2848db365f9a5c1bbfe9ef7c8dc36 (patch)
tree37f56ce55df00e788a6b9754d0bb2023462737b8 /src
parent562df2803fcab0e683283f00de983690d9697d0b (diff)
downloadopenttd-9a05f8004bf2848db365f9a5c1bbfe9ef7c8dc36.tar.xz
(svn r20692) -Fix [FS#4055]: crash after downloading missing content
Diffstat (limited to 'src')
-rw-r--r--src/network/network_gamelist.cpp3
-rw-r--r--src/network/network_gui.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index 4e034aab3..d248df429 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -188,7 +188,8 @@ void NetworkAfterNewGRFScan()
item->info.compatible = false;
} else {
c->filename = f->filename;
- c->name = f->name;
+ CleanUpGRFText(c->name);
+ c->name = DuplicateGRFText(f->name);
c->info = f->info;
c->status = GCS_UNKNOWN;
}
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index ee110152d..f840b338f 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -28,6 +28,7 @@
#include "../sortlist_type.h"
#include "../company_func.h"
#include "../core/geometry_func.hpp"
+#include "../newgrf_text.h"
#include "table/strings.h"
#include "../table/sprites.h"
@@ -811,7 +812,8 @@ public:
}
c->filename = f->filename;
- c->name = f->name;
+ CleanUpGRFText(c->name);
+ c->name = DuplicateGRFText(f->name);
c->info = f->info;
c->status = GCS_UNKNOWN;
}