Index: /branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadICRF_readstars.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadICRF_readstars.c	(revision 37612)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/addstar/src/loadICRF_readstars.c	(revision 37613)
@@ -50,9 +50,9 @@
 
   // ICRF QSO photcodes (we store flux in Jy and AB mags) 
-  PhotCode *codeS = GetPhotcodebyName ("ICRF_S");
-  PhotCode *codeC = GetPhotcodebyName ("ICRF_C");
-  PhotCode *codeX = GetPhotcodebyName ("ICRF_X");
-  PhotCode *codeU = GetPhotcodebyName ("ICRF_U");
-  PhotCode *codeK = GetPhotcodebyName ("ICRF_K");
+  PhotCode *codeS = GetPhotcodebyName ("ICRF_S"); if (!codeS) { fprintf (stderr, "missing ICRF_S, exiting\n"); exit (1); }
+  PhotCode *codeC = GetPhotcodebyName ("ICRF_C"); if (!codeC) { fprintf (stderr, "missing ICRF_C, exiting\n"); exit (1); }
+  PhotCode *codeX = GetPhotcodebyName ("ICRF_X"); if (!codeX) { fprintf (stderr, "missing ICRF_X, exiting\n"); exit (1); }
+  PhotCode *codeU = GetPhotcodebyName ("ICRF_U"); if (!codeU) { fprintf (stderr, "missing ICRF_U, exiting\n"); exit (1); }
+  PhotCode *codeK = GetPhotcodebyName ("ICRF_K"); if (!codeK) { fprintf (stderr, "missing ICRF_K, exiting\n"); exit (1); }
 
   /* read in stars line-by-line */
