mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
glimagesink: Guard against disconnecting invalid signal ids
This commit is contained in:
parent
4d790dae67
commit
a72e204eae
1 changed files with 6 additions and 2 deletions
|
@ -1580,8 +1580,12 @@ gst_glimage_sink_on_close (GstGLImageSink * gl_sink)
|
||||||
|
|
||||||
window = gst_gl_context_get_window (gl_sink->context);
|
window = gst_gl_context_get_window (gl_sink->context);
|
||||||
|
|
||||||
g_signal_handler_disconnect (window, gl_sink->key_sig_id);
|
if (gl_sink->key_sig_id)
|
||||||
g_signal_handler_disconnect (window, gl_sink->mouse_sig_id);
|
g_signal_handler_disconnect (window, gl_sink->key_sig_id);
|
||||||
|
gl_sink->key_sig_id = 0;
|
||||||
|
if (gl_sink->mouse_sig_id)
|
||||||
|
g_signal_handler_disconnect (window, gl_sink->mouse_sig_id);
|
||||||
|
gl_sink->mouse_sig_id = 0;
|
||||||
|
|
||||||
g_atomic_int_set (&gl_sink->to_quit, 1);
|
g_atomic_int_set (&gl_sink->to_quit, 1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue