From c0e3ea7ae31b6c3ad6eb16bc1f7a5d9359323b74 Mon Sep 17 00:00:00 2001 From: Nonoo Date: Mon, 9 Nov 2020 09:54:39 +0100 Subject: [PATCH] Fix panic on tune end --- civcontrol.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/civcontrol.go b/civcontrol.go index f53627a..7fa62f6 100644 --- a/civcontrol.go +++ b/civcontrol.go @@ -513,7 +513,9 @@ func (s *civControlStruct) decodeTransmitStatus(d []byte) bool { } else { if s.state.ptt { // PTT released? s.state.ptt = false - s.state.pttTimeoutTimer.Stop() + if s.state.pttTimeoutTimer != nil { + s.state.pttTimeoutTimer.Stop() + } _ = s.getVd() } }