[Spice-devel] [PATCH spice-server 1/1] video-stream: prevent crash on stream reattach

Douglas Paul doug at bogon.ca
Wed Mar 6 14:31:14 UTC 2019


---
 server/video-stream.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/video-stream.c b/server/video-stream.c
index b624093e..19795098 100644
--- a/server/video-stream.c
+++ b/server/video-stream.c
@@ -369,7 +369,9 @@ static void before_reattach_stream(DisplayChannel *display,
 #ifdef STREAM_STATS
             agent->stats.num_drops_pipe++;
 #endif
-            agent->video_encoder->notify_server_frame_drop(agent->video_encoder);
+            if (agent->video_encoder) {
+                agent->video_encoder->notify_server_frame_drop(agent->video_encoder);
+            }
         }
     }
 }
-- 
2.19.2



More information about the Spice-devel mailing list