IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 19, 2011, 3:26:31 PM (15 years ago)
Author:
bills
Message:

avoid NULL pointer for skycells with no surviving detections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppTranslate/src/ppMopsWrite.c

    r32406 r32413  
    6464    for (long i=0; i<detections->n; i++) {
    6565        ppMopsDetections *det = detections->data[i];
     66        if (!det) {
     67            continue;
     68        }
    6669        total += det->num;
    6770    }
     
    257260        for (long i=0; i<detections->n; i++) {
    258261            ppMopsDetections *det = detections->data[i];
    259             if (det->num == 0) {
     262            if (!det || det->num == 0) {
    260263                // no detections survived for this input
    261264                continue;
     
    292295        for (long i=0; i<detections->n; i++) {
    293296            ppMopsDetections *det = detections->data[i];
    294             if (det->num == 0) {
     297            if (!det || det->num == 0) {
    295298                // no detections survived for this input
    296299                continue;
     
    362365    for (long i = 0; i<detections->n; i++) {
    363366        ppMopsDetections *det = detections->data[i];
     367        if (!det) {
     368            continue;
     369        }
    364370        psS64 diffSkyfileId = det->diffSkyfileId;
    365371        for (long j = 0; j < det->num; j++) {
Note: See TracChangeset for help on using the changeset viewer.