IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34540


Ignore:
Timestamp:
Oct 24, 2012, 8:49:03 AM (14 years ago)
Author:
bills
Message:

in psphotSatstarProfileOp if source->satstar is NULL, use source->parent->satstar
if both are null assert instead of triggering SEGV

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotDeblendSatstars.c

    r34492 r34540  
    544544    float logRdel = 0.1;
    545545
    546     float Xc = source->satstar->Xo - source->pixels->col0 - 0.5;
    547     float Yc = source->satstar->Yo - source->pixels->row0 - 0.5;
    548     psVector *logRmodel = source->satstar->logRmodel;
    549     psVector *logFmodel = source->satstar->logFmodel;
     546    pmSourceSatstar *satstar = source->satstar ? source->satstar : (source->parent ? source->parent->satstar : NULL);
     547    psAssert (satstar, "null satstar");
     548    float Xc = satstar->Xo - source->pixels->col0 - 0.5;
     549    float Yc = satstar->Yo - source->pixels->row0 - 0.5;
     550    psVector *logRmodel = satstar->logRmodel;
     551    psVector *logFmodel = satstar->logFmodel;
    550552
    551553    for (int iy = 0; iy < source->pixels->numRows; iy++) {
Note: See TracChangeset for help on using the changeset viewer.