vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <[email protected]> | Thu Sep 29 23:28:32 2011 +0300| [9f9a30c039a3e08f91f4ee9f0d8bf1958efe701a] | committer: 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) > http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=9f9a30c039a3e08f91f4ee9f0d8bf1958efe701a --- modules/gui/qt4/components/extended_panels.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp index 3fcbd2a..1214d34 100644 --- a/modules/gui/qt4/components/extended_panels.cpp +++ b/modules/gui/qt4/components/extended_panels.cpp @@ -689,7 +689,10 @@ void ExtV4l2::Refresh( void ) for( int i = 0; i < val.p_list->i_count; i++ ) { 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; msg_Dbg( p_intf, "v4l2 control \"%x\": %s (%s)", val.p_list->p_values[i].i_int, psz_var, name.psz_string ); _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
