Commit b520ea01 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Must check if target image is null before using image_data

parent 48791417
......@@ -305,16 +305,16 @@ void Focus::newFITS(IBLOB *bp)
ISD::CCDChip *targetChip = currentCCD->getChip(ISD::CCDChip::PRIMARY_CCD);
FITSView *targetImage = targetChip->getImage(FITS_FOCUS);
FITSImage *image_data = targetImage->getImageData();
currentCCD->disconnect(this);
if (targetImage == NULL)
{
qDebug() << "Error: targetImage is NULL!" << endl;
return;
}
FITSImage *image_data = targetImage->getImageData();
currentCCD->disconnect(this);
image_data->findStars();
double currentHFR= image_data->getHFR(HFR_MAX);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment