mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-31 02:41:52 +00:00
video-stream: prevent crash on stream reattach
I experienced some crashes with qemu 3.1.0 compiled with libspice-server 0.14.0 on Gentoo. The problem reproduced reliably with a guest running Ubuntu 18.04.2 LTS. If I connect a viewer at system startup, I would get a crash just after the fade-in of the login prompt in GDM. Interestingly, I usually was unable to reproduce the issue if I waited to connect until after the greeter was fully displayed. The patch I used to correct the issue for me applies to the master branch cleanly, so I suspect the problem may still exist. The only other references to this issue I could find were two abrt reports in CentOS: https://bugs.centos.org/view.php?id=15171 https://bugs.centos.org/view.php?id=15441 I'm not sure if the agent->video_encoder is supposed to be guaranteed to exist when this function is called. Signed-off-by: Douglas Paul <doug@bogon.ca> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
6f90c003e8
commit
116ff8ca89
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user