changeset 19033:6b4e874e47c1

- Handle NULLs given to certificate_pool_mkpath without causing errors and whining from escape_filename
author William Ehlhardt <williamehlhardt@gmail.com>
date Wed, 18 Jul 2007 23:50:46 +0000
parents 73172682eefd
children 8b627694bf4a
files libpurple/certificate.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/certificate.c	Wed Jul 18 23:36:51 2007 +0000
+++ b/libpurple/certificate.c	Wed Jul 18 23:50:46 2007 +0000
@@ -268,9 +268,9 @@
 	g_return_val_if_fail(pool->name, NULL);
 
 	/* Escape all the elements for filesystem-friendliness */
-	esc_scheme_name = g_strdup(purple_escape_filename(pool->scheme_name));
-	esc_name = g_strdup(purple_escape_filename(pool->name));
-	esc_id = g_strdup(purple_escape_filename(id));
+	esc_scheme_name = pool ? g_strdup(purple_escape_filename(pool->scheme_name)) : NULL;
+	esc_name = pool ? g_strdup(purple_escape_filename(pool->name)) : NULL;
+	esc_id = id ? g_strdup(purple_escape_filename(id)) : NULL;
 	
 	path = g_build_filename(purple_user_dir(),
 				"certificates", /* TODO: constantize this? */