IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 12:43:26 PM (20 years ago)
Author:
Paul Price
Message:

Adding NULL checks at function start, to provide some robustness, following SEGVs when CELL.TRIMSEC specified incorrectly in the camera format configuration.

File:
1 edited

Legend:

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

    r7204 r7274  
    3333        psFree(regionString);
    3434        psFree(readout);
    35         return NULL;
     35        return false;
    3636    }
    3737    psRegion region = psRegionSet(MAX(trimsec->x0 - readout->col0, 0), // x0
     
    5959            psFree(regionString);
    6060            psFree(readout);
    61             return NULL;
     61            return false;
    6262        }
    6363        psRegion region = psRegionSet(MAX(biassec->x0 - readout->col0, 0), // x0
     
    7272    psFree(iter);
    7373
    74     return readout;
     74    return true;
    7575}
    7676
     
    326326
    327327        pmReadout *readout = pmReadoutAlloc(cell);
    328         readoutCarve(readout, image, trimsec, biassecs);
     328        if (!readoutCarve(readout, image, trimsec, biassecs)) {
     329            psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to carve readout into image and bias sections.\n");
     330            return NULL;
     331        }
    329332        readout->mask = NULL;
    330333        readout->weight = NULL;
Note: See TracChangeset for help on using the changeset viewer.