IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15326


Ignore:
Timestamp:
Oct 17, 2007, 9:38:36 AM (19 years ago)
Author:
Paul Price
Message:

Fixing SEGV when !trimsec.

File:
1 edited

Legend:

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

    r15299 r15326  
    187187        }
    188188        psRegion *trimsec = trimsecItem->data.V; // Trim section
    189         if (psRegionIsNaN(*trimsec)) {
     189        if (!trimsec || psRegionIsNaN(*trimsec)) {
    190190            const char *trimsecSource = psMetadataLookupStr(&mdok, cell->config, "CELL.TRIMSEC.SOURCE");
    191191            if (strcmp(trimsecSource, "VALUE") == 0) {
    192192
    193193                const char *trimsecStr = psMetadataLookupStr(&mdok, cell->config, "CELL.TRIMSEC");
     194                if (!trimsec) {
     195                    trimsec = trimsecItem->data.V = psRegionAlloc(NAN, NAN, NAN, NAN);
     196                }
    194197                *trimsec = psRegionFromString(trimsecStr);
    195198            } else {
Note: See TracChangeset for help on using the changeset viewer.