IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18185


Ignore:
Timestamp:
Jun 18, 2008, 4:19:02 PM (18 years ago)
Author:
Paul Price
Message:

Check to see if we need to use the database *before* we actually do.

File:
1 edited

Legend:

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

    r18163 r18185  
    371371    PS_ASSERT_PTR_NON_NULL(config, NULL);
    372372
    373     psDB *db = pmConfigDB(config);      // Database handle
    374     if (!db) {
    375         psErrorClear();
    376         psWarning("Unable to initialise database to write concepts.");
    377         return NULL;
    378     }
    379 
    380373    psMetadataItem *item = psMetadataLookup(database, name); // Item to return
    381374    if (item && item->type == PS_DATA_METADATA) {
     
    389382    if (item->type != PS_DATA_STRING) {
    390383        psWarning("%s in DATABASE in camera format is not of type STR --- ignored.", name);
     384        return NULL;
     385    }
     386
     387    psDB *db = pmConfigDB(config);      // Database handle
     388    if (!db) {
     389        psErrorClear();
     390        psWarning("Unable to initialise database to write concepts.");
    391391        return NULL;
    392392    }
Note: See TracChangeset for help on using the changeset viewer.