IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2007, 9:02:59 PM (19 years ago)
Author:
magnier
Message:

add some error checking

File:
1 edited

Legend:

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

    r11749 r12397  
    359359                    continue;
    360360                }
     361                // Get the actual item of interest, and correct the name to match the concept name
     362                defaultItem = psMetadataLookup(defaultItem->data.md, dependValue);
     363                if (!defaultItem) {
     364                    psLogMsg(__func__, PS_LOG_WARN, "Concept dependency name %s is not found "
     365                             "in concept table for %s -- ignored.\n", dependValue, dependName);
     366                    psFree(dependName);
     367                    continue;
     368                }
     369                defaultItem = psMetadataItemCopy(defaultItem);
    361370                psFree(dependName);
    362                 // Get the actual item of interest, and correct the name to match the concept name
    363                 defaultItem = psMetadataItemCopy(psMetadataLookup(defaultItem->data.md, dependValue));
    364371                psFree(defaultItem->name);
    365372                defaultItem->name = psStringCopy(name);
Note: See TracChangeset for help on using the changeset viewer.