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

qt4: fix crash if input-title-format is empty

(cherry picked from commit 8ecc026e2094a59cc96be3b507d6eae10849cc24)
parent cbe61dbc
...@@ -512,10 +512,17 @@ void InputManager::UpdateName() ...@@ -512,10 +512,17 @@ void InputManager::UpdateName()
/* Try to get the nowplaying */ /* Try to get the nowplaying */
char *format = var_InheritString( p_intf, "input-title-format" ); char *format = var_InheritString( p_intf, "input-title-format" );
char *formated = str_format_meta( p_input, format ); char *formatted = NULL;
if (format != NULL)
{
formatted = str_format_meta( p_input, format );
free( format ); free( format );
name = qfu(formated); if( formatted != NULL )
free( formated ); {
name = qfu(formatted);
free( formatted );
}
}
/* If we have Nothing */ /* If we have Nothing */
if( name.simplified().isEmpty() ) if( name.simplified().isEmpty() )
......
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