Updating branch refs/heads/0.2.2
         to ac3df212ce7147c2cd1739abbf79a98ad2e995a8 (commit)
       from 674e8e4b123860c08e7ab3d0efc033ff312fdfbd (commit)

commit ac3df212ce7147c2cd1739abbf79a98ad2e995a8
Author: Ali Abdallah <al...@xfce.org>
Date:   Wed Jan 13 18:52:56 2010 +0100

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

 src/parole-statusbar.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/parole-statusbar.c b/src/parole-statusbar.c
index fdfcb3e..b5b9eca 100644
--- a/src/parole-statusbar.c
+++ b/src/parole-statusbar.c
@@ -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);
        }
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to