From 9b237345d1b6de8e1e91d07772b0da7b64219a42 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-70-g09d2