Skip to content
Snippets Groups Projects
Commit 5d643c7b authored by Gabriel Lafond-Thenaille's avatar Gabriel Lafond-Thenaille Committed by Steve Lhomme
Browse files

core: fix crash in vlc_dialog_release

Don't call get_dialog_provider in vlc_dialog_release to prevent a crash
in case vlc_killed is true.
parent d085a439
No related branches found
No related tags found
1 merge request!4817core: fix crash in vlc_dialog_release
Pipeline #429247 passed with stages
in 28 minutes and 41 seconds
......@@ -732,7 +732,13 @@ void
vlc_dialog_release(vlc_object_t *p_obj, vlc_dialog_id *p_id)
{
assert(p_obj != NULL && p_id != NULL);
vlc_dialog_provider *p_provider = get_dialog_provider(p_obj, false);
/* We can't use get_dialog_provider here because when vlc_killed is true,
* get_dialog_provider returns NULL, and we can't release the dialog
* properly. Moreover, since the dialog has been created by the provider,
* we can be sure that one exists. */
vlc_dialog_provider *p_provider =
libvlc_priv(vlc_object_instance(p_obj))->p_dialog_provider;
assert(p_provider != NULL);
vlc_mutex_lock(&p_provider->lock);
dialog_cancel_locked(p_provider, p_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment