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

dbus: avoid invalid zero-size array

parent af9c01e9
...@@ -833,7 +833,7 @@ static void *Run( void *data ) ...@@ -833,7 +833,7 @@ static void *Run( void *data )
/* Get the list of watches to process */ /* Get the list of watches to process */
i_watches = vlc_array_count( p_sys->p_watches ); i_watches = vlc_array_count( p_sys->p_watches );
DBusWatch *p_watches[i_watches]; DBusWatch *p_watches[i_watches ? i_watches : 1];
for( int i = 0; i < i_watches; i++ ) for( int i = 0; i < i_watches; i++ )
{ {
p_watches[i] = vlc_array_item_at_index( p_sys->p_watches, i ); p_watches[i] = vlc_array_item_at_index( p_sys->p_watches, 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