IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 4, 2007, 12:09:50 PM (19 years ago)
Author:
Paul Price
Message:

Catching NULL trimsec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsStandard.c

    r15052 r15219  
    140140
    141141    if (item->type == PS_DATA_STRING) {
    142         return psMetadataItemAllocStr(concept->name, concept->comment, item->data.V);
     142        return psMetadataItemAllocStr(concept->name, concept->comment, item->data.V);
    143143    }
    144144
    145145    if (item->type == PS_DATA_METADATA_MULTI) {
    146         psMetadataItem *entry = psListGet (item->data.list, PS_LIST_HEAD);
    147         if (!entry) {
    148             psError(PS_ERR_UNEXPECTED_NULL, true,
    149                     "List for %s in FILTER.ID in camera configuration is empty.\n", key);
    150             return NULL;
    151         }
    152         return psMetadataItemAllocStr(concept->name, concept->comment, entry->data.V);
     146        psMetadataItem *entry = psListGet (item->data.list, PS_LIST_HEAD);
     147        if (!entry) {
     148            psError(PS_ERR_UNEXPECTED_NULL, true,
     149                    "List for %s in FILTER.ID in camera configuration is empty.\n", key);
     150            return NULL;
     151        }
     152        return psMetadataItemAllocStr(concept->name, concept->comment, entry->data.V);
    153153    }
    154154
    155155    psError(PS_ERR_UNEXPECTED_NULL, true,
    156             "Unable to find %s in FILTER.ID in camera configuration.\n", key);
     156            "Unable to find %s in FILTER.ID in camera configuration.\n", key);
    157157    return NULL;
    158158}
     
    800800
    801801    psRegion *trimsec = psMemIncrRefCounter(concept->data.V); // The trimsec region
     802    if (!trimsec) {
     803        return psMetadataItemAllocStr(concept->name, concept->comment, NULL);
     804    }
    802805
    803806    // Correct trim section for binning if it's specified explicitly (i.e., immutably) in the CELLS.
Note: See TracChangeset for help on using the changeset viewer.