diff --git a/plugins/channelrx/demodatv/atvdemod.cpp b/plugins/channelrx/demodatv/atvdemod.cpp index 48516cd83..73ac7ef83 100644 --- a/plugins/channelrx/demodatv/atvdemod.cpp +++ b/plugins/channelrx/demodatv/atvdemod.cpp @@ -431,13 +431,13 @@ void ATVDemod::demod(Complex& c) //********** process video sample ********** - if (m_running.m_enmATVStandard == ATVStdHSkip) + if (m_registeredTVScreen) // can process only if the screen is available (set via the GUI) { - processHSkip(fltVal, intVal); - } - else - { - processClassic(fltVal, intVal); + if (m_running.m_enmATVStandard == ATVStdHSkip) { + processHSkip(fltVal, intVal); + } else { + processClassic(fltVal, intVal); + } } } diff --git a/plugins/channelrx/demodatv/atvdemod.h b/plugins/channelrx/demodatv/atvdemod.h index 419c92623..dda259740 100644 --- a/plugins/channelrx/demodatv/atvdemod.h +++ b/plugins/channelrx/demodatv/atvdemod.h @@ -231,7 +231,7 @@ public: virtual QByteArray serialize() const { return QByteArray(); } virtual bool deserialize(const QByteArray& data __attribute__((unused))) { return false; } - void setTVScreen(TVScreen *objScreen); + void setTVScreen(TVScreen *objScreen); //!< set by the GUI int getSampleRate(); int getEffectiveSampleRate(); double getMagSq() const { return m_objMagSqAverage; } //!< Beware this is scaled to 2^30