Changeset 6117 for trunk/psphot/src/psphotChoosePSF.c
- Timestamp:
- Jan 20, 2006, 8:57:16 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotChoosePSF.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotChoosePSF.c
r5993 r6117 34 34 35 35 // get the list pointers for the PSF_MODEL entries 36 psList *list = NULL; 36 37 psMetadataItem *mdi = psMetadataLookup (config, "PSF_MODEL"); 37 38 if (mdi == NULL) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection"); 38 39 psList *list = (psList *) mdi->data.list; 40 psListIterator *iter = psListIteratorAlloc (list, PS_LIST_HEAD, FALSE); 39 if (mdi->type == PS_DATA_STRING) { 40 list = psListAlloc(NULL); 41 psListAdd (list, PS_LIST_HEAD, mdi); 42 } else { 43 if (mdi->type != PS_DATA_METADATA_MULTI) psAbort ("psphotChoosePSF", "missing PSF_MODEL selection"); 44 list = psMemIncrRefCounter(mdi->data.list); 45 } 41 46 42 47 // set up an array to store the results … … 44 49 45 50 // try each model option listed in config 51 psListIterator *iter = psListIteratorAlloc (list, PS_LIST_HEAD, FALSE); 46 52 for (int i = 0; i < models->n; i++) { 47 53 … … 54 60 } 55 61 psFree (iter); 56 // psFree (list); XXX is list freed with iter?62 psFree (list); 57 63 psFree (stars); 58 64
Note:
See TracChangeset
for help on using the changeset viewer.
