IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2008, 2:15:38 PM (18 years ago)
Author:
Paul Price
Message:

Adding error check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_080320/ppMerge/src/ppMergeLoop.c

    r17170 r17183  
    168168                            psFree(readouts); \
    169169                            psFree(outRO); \
    170                             psFree(view); \
    171                             return false; \
     170                            goto ERROR; \
    172171                        } \
    173172                    }
     
    184183                switch (type) {
    185184                  case PPMERGE_TYPE_SHUTTER:
    186                     pmShutterCorrectionGenerate(outRO, NULL, readouts, shutterRef,
    187                                                 shutters->data[cellNum], iter, rej,
    188                                                 maskVal);
     185                    if (!pmShutterCorrectionGenerate(outRO, NULL, readouts, shutterRef,
     186                                                     shutters->data[cellNum], iter, rej, maskVal)) {
     187                        psFree(readouts);
     188                        psFree(outRO);
     189                        goto ERROR;
     190                    }
    189191                    break;
    190192                  case PPMERGE_TYPE_DARK:
    191                     pmDarkCombine(outCell, readouts, darkOrdinates, darkNorm, iter, rej, maskVal);
     193                    if (!pmDarkCombine(outCell, readouts, darkOrdinates, darkNorm, iter, rej, maskVal)) {
     194                        psFree(readouts);
     195                        psFree(outRO);
     196                        goto ERROR;
     197                    }
    192198                    break;
    193199                  case PPMERGE_TYPE_BIAS:
    194200                  case PPMERGE_TYPE_FLAT:
    195201                  case PPMERGE_TYPE_FRINGE:
    196                     pmReadoutCombine(outRO, readouts, zeros, scales, combination);
     202                    if (!pmReadoutCombine(outRO, readouts, zeros, scales, combination)) {
     203                        psFree(readouts);
     204                        psFree(outRO);
     205                        goto ERROR;
     206                    }
    197207                    break;
    198208                  default:
Note: See TracChangeset for help on using the changeset viewer.