Commit 3f66ca77 authored by Filip Roséen's avatar Filip Roséen Committed by Jean-Baptiste Kempf

input/var: fix deletion of title navigation callbacks

Just as it does not make sense to add callbacks for {next,prev}-title
and menu-{popup,title} if we do not have more than one title, it does
not make sense to delete such callbacks under the same condition
(especially since we would delete in cases we do not create).

Close #17021
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent c2bd8918
...@@ -230,9 +230,11 @@ void input_ControlVarStop( input_thread_t *p_input ) ...@@ -230,9 +230,11 @@ void input_ControlVarStop( input_thread_t *p_input )
if( !p_input->b_preparsing ) if( !p_input->b_preparsing )
InputDelCallbacks( p_input, p_input_callbacks ); InputDelCallbacks( p_input, p_input_callbacks );
if( p_input->p->i_title > 1 )
InputDelCallbacks( p_input, p_input_title_navigation_callbacks );
if( p_input->p->i_title > 0 ) if( p_input->p->i_title > 0 )
{ {
InputDelCallbacks( p_input, p_input_title_navigation_callbacks );
InputDelCallbacks( p_input, p_input_seekpoint_navigation_callbacks ); InputDelCallbacks( p_input, p_input_seekpoint_navigation_callbacks );
for( int i = 0; i < p_input->p->i_title; i++ ) for( int i = 0; i < p_input->p->i_title; i++ )
......
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