IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17253


Ignore:
Timestamp:
Mar 31, 2008, 2:19:14 PM (18 years ago)
Author:
eugene
Message:

do not crash on NULL code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/dvo_photcode_ops.c

    r16810 r17253  
    320320  int i, Np;
    321321  float Mcal, Mrel, Mcol, mc, Mc;
     322
     323  if (code == NULL) return NAN;
    322324
    323325  /* code must be the matching PRI/SEC code for this measurement or an equivalent ALT */
     
    404406  double Mc;
    405407
     408  if (code == NULL) return NAN;
     409
    406410  Ns = photcodes[0].hashNsec[code[0].code];
    407411  Mave = (Ns == -1) ? NAN : secfilt[Ns].M;
     
    428432  float Mave;
    429433
     434  if (code == NULL) return NAN;
     435
    430436  Ns = photcodes[0].hashNsec[code[0].code];
    431437  Mave = (Ns == -1) ? NAN : secfilt[Ns].M;
     
    438444  float dM;
    439445
     446  if (code == NULL) return NAN;
     447
    440448  Ns = photcodes[0].hashNsec[code[0].code];
    441449  dM  = (Ns == -1) ? NAN : secfilt[Ns].dM;
     
    449457  short Mi;
    450458  float Xm;
     459
     460  if (code == NULL) return NAN;
    451461
    452462  Ns = photcodes[0].hashNsec[code[0].code];
Note: See TracChangeset for help on using the changeset viewer.