Index: code/pilotfile/csg.cpp
===================================================================
--- code/pilotfile/csg.cpp	(revision 9680)
+++ code/pilotfile/csg.cpp	(working copy)
@@ -800,7 +800,14 @@
 
 		// ship class, index into ship_list[]
 		i = cfread_int(cfp);
-		ras.ship_class = ship_list[i].index;
+		if ( (i >= (int)ship_list.size()) || (i < -1) ) {
+			mprintf(("CSG => Parse Warning: Invalid value for red alert ship index (%d), emptying slot.\n", i));
+			ras.ship_class = -1;
+		} else if ( i == -1 ) {  // ship destroyed/exited
+			ras.ship_class = i;
+		} else {
+			ras.ship_class = ship_list[i].index;
+		}
 
 		// subsystem hits
 		count = cfread_int(cfp);
@@ -850,8 +857,8 @@
 			ras.secondary_weapons.push_back( weapons );
 		}
 
-		// this is quite likely a *bad* thing if it happens
-		if (ras.ship_class >= 0) {
+		// this is quite likely a *bad* thing if it doesn't happen
+		if (ras.ship_class >= RED_ALERT_EXITED_SHIP_CLASS) {
 			Red_alert_wingman_status.push_back( ras );
 		}
 	}
Index: code/missionui/redalert.cpp
===================================================================
--- code/missionui/redalert.cpp	(revision 9680)
+++ code/missionui/redalert.cpp	(working copy)
@@ -44,10 +44,6 @@
 //static int Red_alert_num_slots_used = 0;
 static int Red_alert_voice_started;
 
-#define RED_ALERT_WARN_TIME		4000				// time to warn user that new orders are coming
-
-#define RED_ALERT_EXITED_SHIP_CLASS		-1
-
 SCP_vector<red_alert_ship_status> Red_alert_wingman_status;
 SCP_string Red_alert_precursor_mission;
 
Index: code/missionui/redalert.h
===================================================================
--- code/missionui/redalert.h	(revision 9680)
+++ code/missionui/redalert.h	(working copy)
@@ -34,6 +34,11 @@
 
 // should only ever be defined in redalert.cpp and the pilot file code!!
 #ifdef REDALERT_INTERNAL
+
+#define RED_ALERT_WARN_TIME		4000				// time to warn user that new orders are coming
+
+#define RED_ALERT_EXITED_SHIP_CLASS		-1
+
 typedef struct red_alert_ship_status {
 	SCP_string	name;
 	float		hull;
