summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-04-07 01:07:44 +0100
committerBastien Nocera <hadess@hadess.net>2011-04-07 01:54:30 +0100
commitccf907d50e713b2052be604cfbc834f6bb22c7ed (patch)
treede8287cbaf44da0b0bd8a93e07f29c3eeac3c151
parent9aca80e5abf85f8c9e816f2446556749db555903 (diff)
main: Stop crash when XDG_CACHE_HOME is relative
Don't crash but error when a relative path is given. https://bugzilla.gnome.org/show_bug.cgi?id=646950
-rw-r--r--src/totem-uri.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/totem-uri.c b/src/totem-uri.c
index 7104f776..eaa7a726 100644
--- a/src/totem-uri.c
+++ b/src/totem-uri.c
@@ -336,6 +336,8 @@ totem_uri_get_subtitle_for_uri (const char *uri)
guint len, i;
gint suffix;
+ g_return_val_if_fail (uri != NULL, NULL);
+
/* Find the filename suffix delimiter */
len = strlen (uri);
for (suffix = len - 1; suffix > 0; suffix--) {