Changeset 41526 for trunk/pswarp/src/pswarpLoadAstrometry.c
- Timestamp:
- Apr 2, 2021, 2:52:30 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/pswarp/src/pswarpLoadAstrometry.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pswarp/src/pswarpLoadAstrometry.c
r39981 r41526 150 150 } 151 151 } 152 targetChip->toFPA = psMemIncrRefCounter (chip->toFPA); 153 targetChip->fromFPA = psMemIncrRefCounter (chip->fromFPA); 152 if (targetChip != chip) { 153 psAssert (!targetChip->toFPA, "oops"); 154 psAssert (!targetChip->fromFPA, "oops"); 155 targetChip->toFPA = psMemIncrRefCounter (chip->toFPA); 156 targetChip->fromFPA = psMemIncrRefCounter (chip->fromFPA); 157 } 154 158 } 155 159 156 160 // for pswarpLocalFrame, I need transformations and HDUs on a single fpa (so set on astrom as well as target) 157 target->fpa->toTPA = psMemIncrRefCounter (astrom->fpa->toTPA); 158 target->fpa->fromTPA = psMemIncrRefCounter (astrom->fpa->fromTPA); 159 target->fpa->toSky = psMemIncrRefCounter (astrom->fpa->toSky); 161 // But: do not increment the ref counter if this is the same entry 162 if (target->fpa != astrom->fpa) { 163 psAssert (!target->fpa->toTPA, "oops"); 164 psAssert (!target->fpa->fromTPA, "oops"); 165 psAssert (!target->fpa->toSky, "oops"); 166 target->fpa->toTPA = psMemIncrRefCounter (astrom->fpa->toTPA); 167 target->fpa->fromTPA = psMemIncrRefCounter (astrom->fpa->fromTPA); 168 target->fpa->toSky = psMemIncrRefCounter (astrom->fpa->toSky); 169 } 160 170 161 171 // reset the type to the original value
Note:
See TracChangeset
for help on using the changeset viewer.
