Commit bcfa8de4 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

lua/extension: Make sure our input exists when releasing/holding.

parent a41b5f9d
...@@ -472,8 +472,10 @@ static int Control( extensions_manager_t *p_mgr, int i_control, va_list args ) ...@@ -472,8 +472,10 @@ static int Control( extensions_manager_t *p_mgr, int i_control, va_list args )
bool ok = LockExtension(p_ext); bool ok = LockExtension(p_ext);
if (!ok) if (!ok)
return VLC_EGENERIC; return VLC_EGENERIC;
vlc_object_release(p_ext->p_sys->p_input); input_thread_t *old = p_ext->p_sys->p_input;
p_ext->p_sys->p_input = vlc_object_hold(p_input); if (old)
vlc_object_release(old);
p_ext->p_sys->p_input = p_input ? vlc_object_hold(p_input) : p_input;
UnlockExtension(p_ext); UnlockExtension(p_ext);
return VLC_SUCCESS; return VLC_SUCCESS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment