Index: parse/sexp.cpp
===================================================================
--- parse/sexp.cpp	(revision 9621)
+++ parse/sexp.cpp	(working copy)
@@ -7441,7 +7441,7 @@
 }
 
 // Karajorma
-int sexp_get_damage_caused(int node) 
+int sexp_get_damage_caused(int node)
 {
 	int sindex, damaged_sig, attacker_sig; 
 	float damage_caused = 0.0f;
@@ -7477,7 +7477,12 @@
 		sindex = ship_name_lookup(name); 
 		if (sindex < 0) {
 			sindex = ship_find_exited_ship_by_name(name);
-			attacker_sig = Ships_exited[sindex].obj_signature; 
+			if (sindex < 0) {
+				Warning(LOCATION,"Ship '%s' used in sexp_get_damage_caused() was found neither in current nor exited ship listings",name);
+				continue;
+			} else {
+				attacker_sig = Ships_exited[sindex].obj_signature;
+			}
 		}
 		else {
 			attacker_sig = Objects[Ships[sindex].objnum].signature ;
