From 4a1131b7c8605b6bb8599e04c90862f39fd8dcd1 Mon Sep 17 00:00:00 2001 From: Ingo Oppermann Date: Fri, 8 Jul 2022 19:48:09 +0200 Subject: [PATCH] Fix segfault on stopping an invalid process --- restream/restream.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/restream/restream.go b/restream/restream.go index 7a66eafa..94efa8d2 100644 --- a/restream/restream.go +++ b/restream/restream.go @@ -933,6 +933,10 @@ func (r *restream) stopProcess(id string) error { return ErrUnknownProcess } + if task.ffmpeg == nil { + return nil + } + status := task.ffmpeg.Status() if task.process.Order == "stop" && status.Order == "stop" {