summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-20 16:15:19 +0000
committertruelight <truelight@openttd.org>2004-12-20 16:15:19 +0000
commit9b237345d1b6de8e1e91d07772b0da7b64219a42 (patch)
tree0e94177ee0d1dfc7f4dba0975d27e570fbca6b91
parent5f25a0788a319c16d331ce4dcbdbc874ab8e0536 (diff)
downloadopenttd-9b237345d1b6de8e1e91d07772b0da7b64219a42.tar.xz
(svn r1187) -Fix: [Network] You can no longer join as spectator a game with no
companies (a lot of code can simply not handle it)
-rw-r--r--network_gui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/network_gui.c b/network_gui.c
index 8bb3f01f6..809511b87 100644
--- a/network_gui.c
+++ b/network_gui.c
@@ -643,6 +643,10 @@ static void NetworkLobbyWindowWndProc(Window *w, WindowEvent *e)
if (_network_lobby_company_count == MAX_PLAYERS)
w->disabled_state |= (1<<8);
+ /* You can not join a server as spectator when it has no companies active..
+ it causes some nasty crashes */
+ if (_network_lobby_company_count == 0)
+ w->disabled_state |= (1<<9);
DrawWindowWidgets(w);