IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 4:48:50 PM (20 years ago)
Author:
Paul Price
Message:

Some extra error-checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmHDUGenerate.c

    r7278 r7288  
    213213        pmReadout *readout = cell->readouts->data[0]; // The first readout, as representative
    214214        psImage *image = readout->image;// The proper image
    215 
     215        if (!image) {
     216            continue;
     217        }
    216218        psFree(trimsec);                // Drop old reference
    217219        trimsec = sectionForImage(&position, image, cellreaddir); // New reference
     
    254256            for (int i = 0; i < numReadouts; i++) {
    255257                pmReadout *readout = readouts->data[i]; // The readout
     258                if (!readout || !readout->image) {
     259                    continue;
     260                }
    256261                psElemType imageType = readout->image->type.type; // Type for this image
    257262                if (type == 0) {
     
    309314            for (int i = 0; i < readouts->n; i++) {
    310315                pmReadout *readout = readouts->data[i]; // The readout of interest
     316                if (!readout) {
     317                    continue;
     318                }
    311319                psImage *image = readout->image; // The image pixels
    312320                psImage *hduImage = hduImages->data[i]; // The HDU image of interest
Note: See TracChangeset for help on using the changeset viewer.