(svn r11878) -Fix: Crash in MP in vehicle group window if the currently selected group is deleted by another player.
authorpeter1138
Wed, 16 Jan 2008 16:52:50 +0000
changeset 8313 f019d55e0cb4
parent 8312 8b4944b3b5a3
child 8314 9100cd20041b
(svn r11878) -Fix: Crash in MP in vehicle group window if the currently selected group is deleted by another player.
src/group_gui.cpp
--- a/src/group_gui.cpp	Wed Jan 16 15:48:36 2008 +0000
+++ b/src/group_gui.cpp	Wed Jan 16 16:52:50 2008 +0000
@@ -299,6 +299,7 @@
 		case WE_INVALIDATE_DATA:
 			gv->l.flags |= VL_REBUILD;
 			gl->l.flags |= VL_REBUILD;
+			if (!IsValidGroupID(gv->group_sel)) gv->group_sel = ALL_GROUP;
 			UpdateGroupActionDropdown(w, gv->group_sel);
 			SetWindowDirty(w);
 			break;