Commit c0adeb10 authored by Ali Abdallah's avatar Ali Abdallah

Avoid a Glib warning in the statusbar when filename is null.

parent 53c308b7
......@@ -150,11 +150,15 @@ static void parole_statusbar_set_text (ParoleStatusbar *bar, const ParoleStream
if ( G_LIKELY (live == FALSE) )
{
if ( title == NULL )
{
filename = g_filename_from_uri (uri, NULL, NULL);
title = g_filename_display_basename (filename);
g_free (filename);
}
{
filename = g_filename_from_uri (uri, NULL, NULL);
if (filename )
{
title = g_filename_display_basename (filename);
g_free (filename);
}
}
text = g_strdup (title != NULL ? title : filename);
gtk_label_set_text (GTK_LABEL (bar->priv->label_text), text);
}
......
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