IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7843


Ignore:
Timestamp:
Jul 7, 2006, 2:37:48 PM (20 years ago)
Author:
jhoblitt
Message:

fix PX_FRAME_SEARCH() to handle missing imfiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pxframes.c

    r6978 r7843  
    9696    allFrames->n = 0; \
    9797 \
    98     for (int i = 0; i < exposures->n; i++) { \
     98    for (int i = 0; i < psArrayLength(exposures); i++) { \
    9999        exptype##Row *exposure = exposures->data[i]; \
    100100\
    101         psMetadata *where = psMetadataAlloc (); \
     101        psMetadata *where = psMetadataAlloc(); \
    102102        psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", PS_META_REPLACE, "==", \
    103103            exposure->exp_id); \
     
    107107        psFree(where); \
    108108        if (!images) { \
    109             psError(PS_ERR_UNKNOWN, false, "no " #imfiletype " rows found"); \
    110             psFree(allFrames); \
    111  \
    112             return NULL; \
     109            psError(PS_ERR_UNKNOWN, false, "no " #imfiletype " rows found for exp_id %s", exposure->exp_id); \
     110 \
     111            continue; \
    113112        } \
    114113 \
    115114        frametype *frame = frametype##Alloc(exposure, images); \
    116115        psArrayAdd(allFrames, 100, frame); \
     116    } \
     117 \
     118    if (!psArrayLength(allFrames)) { \
     119        psFree(allFrames); \
     120        allFrames = NULL; \
    117121    } \
    118122 \
Note: See TracChangeset for help on using the changeset viewer.