[totem/gnome-3-0] main: Stop crash when XDG_CACHE_HOME is relative



commit ccf907d50e713b2052be604cfbc834f6bb22c7ed
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Apr 7 01:07:44 2011 +0100

    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

 src/totem-uri.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/totem-uri.c b/src/totem-uri.c
index 7104f77..eaa7a72 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--) {



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