diff --git a/kstars/ekos/capture/capture.cpp b/kstars/ekos/capture/capture.cpp index d2c904e145758444e777f52a35e0165074aeafdb..24d0f5cd421debd8c5b7491c3ecc25b30139ac1c 100644 --- a/kstars/ekos/capture/capture.cpp +++ b/kstars/ekos/capture/capture.cpp @@ -464,8 +464,18 @@ void Capture::stop(bool abort) emit newStatus(Ekos::CAPTURE_ABORTED); } - activeJob->disconnect(this); - activeJob->reset(); + if (activeJob->isPreview() == false) + { + activeJob->disconnect(this); + activeJob->reset(); + } + else // Delete preview job + { + jobs.removeOne(activeJob); + delete (activeJob); + activeJob = nullptr; + } + } state = CAPTURE_IDLE;