[vlc-commits] skins: fix crash if input-title-format is empty
Rémi Denis-Courmont
git at videolan.org
Wed May 6 23:03:02 CEST 2015
vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 6 23:58:14 2015 +0300| [be7f779401b602a00687fd5e432c3f26e4615c28] | committer: Rémi Denis-Courmont
skins: fix crash if input-title-format is empty
(cherry picked from commit 541b381c676cc96b6e1967610a2077b00950b86d)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=be7f779401b602a00687fd5e432c3f26e4615c28
---
modules/gui/skins2/src/vlcproc.cpp | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index dcf3b30..f490737 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -738,9 +738,15 @@ void VlcProc::update_current_input()
{
// Update short name (as defined by --input-title-format)
char *psz_fmt = var_InheritString( getIntf(), "input-title-format" );
- char *psz_name = str_format_meta( pInput, psz_fmt );
- SET_TEXT( m_cVarStreamName, UString( getIntf(), psz_name ) );
- free( psz_fmt );
+ char *psz_name = NULL;
+ if( psz_fmt != NULL )
+ {
+ psz_name = str_format_meta( pInput, psz_fmt );
+ free( psz_fmt );
+ }
+
+ SET_TEXT( m_cVarStreamName, UString( getIntf(),
+ psz_name ? psz_name : "" ) );
free( psz_name );
// Update local path (if possible) or full uri
More information about the vlc-commits
mailing list