From 518aa0c8eb8e006cd6a12d9852958716587e9250 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 8 Aug 2019 13:25:28 +0100 Subject: [PATCH] Fix a potential crash in the Omni-Rig interface Misconfiguration of the PTT Method could cause a null pointer dereference. --- OmniRigTransceiver.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OmniRigTransceiver.cpp b/OmniRigTransceiver.cpp index de352fb5a..4ef92312f 100644 --- a/OmniRigTransceiver.cpp +++ b/OmniRigTransceiver.cpp @@ -662,10 +662,9 @@ void OmniRigTransceiver::do_ptt (bool on) port_->SetDtr (on); } } - else + else if (wrapped_) { TRACE_CAT ("OmniRigTransceiver", "set PTT using basic transceiver"); - Q_ASSERT (wrapped_); TransceiverState new_state {wrapped_->state ()}; new_state.ptt (on); wrapped_->set (new_state, 0);