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

Qt4: fix invalid pointer on unknown V4L2 control type (fix #5391)

var_Change(VLC_VAR_GETTEXT) fails if there is no text. In that case,
the value is undefined.

(not cherry picked from commit 9551501fcb7089342c36395cb54a387594e73601)
parent 1807bee5
...@@ -689,7 +689,10 @@ void ExtV4l2::Refresh( void ) ...@@ -689,7 +689,10 @@ void ExtV4l2::Refresh( void )
for( int i = 0; i < val.p_list->i_count; i++ ) for( int i = 0; i < val.p_list->i_count; i++ )
{ {
const char *psz_var = text.p_list->p_values[i].psz_string; const char *psz_var = text.p_list->p_values[i].psz_string;
var_Change( p_obj, psz_var, VLC_VAR_GETTEXT, &name, NULL );
if( var_Change( p_obj, psz_var, VLC_VAR_GETTEXT, &name, NULL ) )
continue;
const char *psz_label = name.psz_string; const char *psz_label = name.psz_string;
msg_Dbg( p_intf, "v4l2 control \"%x\": %s (%s)", msg_Dbg( p_intf, "v4l2 control \"%x\": %s (%s)",
val.p_list->p_values[i].i_int, psz_var, name.psz_string ); val.p_list->p_values[i].i_int, psz_var, name.psz_string );
......
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