IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24988


Ignore:
Timestamp:
Aug 3, 2009, 5:06:08 PM (17 years ago)
Author:
eugene
Message:

init photcodeData to NULL, check for NULL value before using

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/ReadImageHeader.c

    r24973 r24988  
    88  double tmp, sec, Cerror, ZeroPt, FWHM_X, FWHM_Y;
    99  char *c, photname[64], line[80];
    10   PhotCode *photcodeData;
     10  PhotCode *photcodeData = NULL;
    1111
    1212  // zero out the entire image structure
     
    206206  if (!strcasecmp(ZERO_POINT_OPTION, "CHIP_HEADER")) {
    207207      float ZPT_OBS;
    208       if (!gfits_scan (header, "ZPT_OBS", "%f", 1, &ZPT_OBS)) {
     208      if (!photcodeData || !gfits_scan (header, "ZPT_OBS", "%f", 1, &ZPT_OBS)) {
    209209          fprintf (stderr, "zero point not supplied in header\n");
    210210          ZERO_POINT_OFFSET = 0.0;
Note: See TracChangeset for help on using the changeset viewer.