screencast: protect against NULL stream in xdpw_pwr_stream_destroy()
- this allows repeated calls of xdpw_pwr_stream_destroy() on a single screencast instance
This commit is contained in:
parent
dbe71a66c7
commit
d2fa4aa5e7
|
@ -230,6 +230,10 @@ int xdpw_pwr_context_create(struct xdpw_state *state) {
|
|||
}
|
||||
|
||||
void xdpw_pwr_stream_destroy(struct xdpw_screencast_instance *cast) {
|
||||
if (!cast->stream) {
|
||||
return;
|
||||
}
|
||||
|
||||
logprint(DEBUG, "pipewire: destroying stream");
|
||||
pw_stream_flush(cast->stream, false);
|
||||
pw_stream_disconnect(cast->stream);
|
||||
|
|
Loading…
Reference in New Issue