[rhythmbox] generic-player: g_str_has_suffix doesn't like NULL



commit c08c802a5fd4b77a4fae5782a6c056df142b184c
Author: Jonathan Matthew <jonathan d14n org>
Date:   Tue Oct 1 22:45:45 2013 +1000

    generic-player: g_str_has_suffix doesn't like NULL

 plugins/generic-player/rb-generic-player-source.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/generic-player/rb-generic-player-source.c 
b/plugins/generic-player/rb-generic-player-source.c
index 7b77ff9..47a842b 100644
--- a/plugins/generic-player/rb-generic-player-source.c
+++ b/plugins/generic-player/rb-generic-player-source.c
@@ -1269,7 +1269,7 @@ rb_generic_player_source_get_playlist_path (RBGenericPlayerSource *source)
        char *path;
 
        g_object_get (priv->device_info, "playlist-path", &path, NULL);
-       if (g_str_has_suffix (path, "%File")) {
+       if (path != NULL && g_str_has_suffix (path, "%File")) {
                path[strlen (path) - strlen("%File")] = '\0';
        }
        return path;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]