Index: trunk/Ohana/src/addstar/src/ReadImageHeader.c
===================================================================
--- trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 24987)
+++ trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 24988)
@@ -8,5 +8,5 @@
   double tmp, sec, Cerror, ZeroPt, FWHM_X, FWHM_Y;
   char *c, photname[64], line[80];
-  PhotCode *photcodeData;
+  PhotCode *photcodeData = NULL;
 
   // zero out the entire image structure
@@ -206,5 +206,5 @@
   if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_HEADER")) {
       float ZPT_OBS;
-      if (!gfits_scan (header, "ZPT_OBS", "%f", 1, &ZPT_OBS)) {
+      if (!photcodeData || !gfits_scan (header, "ZPT_OBS", "%f", 1, &ZPT_OBS)) {
 	  fprintf (stderr, "zero point not supplied in header\n");
 	  ZERO_POINT_OFFSET = 0.0;
