Commit f07b45fc authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

lua: fix NULL dereference and flawed logic

parent d9c624c0
...@@ -1207,21 +1207,20 @@ static void WatchTimerCallback( void *data ) ...@@ -1207,21 +1207,20 @@ static void WatchTimerCallback( void *data )
vlc_mutex_lock( &p_ext->p_sys->command_lock ); vlc_mutex_lock( &p_ext->p_sys->command_lock );
// Do we have a pending Deactivate command? for( struct command_t *cmd = p_ext->p_sys->command;
if( ( p_ext->p_sys->command && cmd != NULL;
p_ext->p_sys->command->i_command == CMD_DEACTIVATE ) cmd = cmd->next )
|| ( p_ext->p_sys->command->next if( cmd->i_command == CMD_DEACTIVATE )
&& p_ext->p_sys->command->next->i_command == CMD_DEACTIVATE) ) { /* We have a pending Deactivate command... */
{ if( p_ext->p_sys->progress )
if( p_ext->p_sys->progress ) {
{ dialog_ProgressDestroy( p_ext->p_sys->progress );
dialog_ProgressDestroy( p_ext->p_sys->progress ); p_ext->p_sys->progress = NULL;
p_ext->p_sys->progress = NULL; }
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
KillExtension( p_mgr, p_ext );
return;
} }
vlc_mutex_unlock( &p_ext->p_sys->command_lock );
KillExtension( p_mgr, p_ext );
return;
}
if( !p_ext->p_sys->progress ) if( !p_ext->p_sys->progress )
{ {
......
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