From c1ab4b58e3b3c1d18b96ed4cfff0712fee6c2d92 Mon Sep 17 00:00:00 2001 From: truelight Date: Mon, 20 Dec 2004 16:15:19 +0000 Subject: (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) --- network_gui.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3-54-g00ecf