[gimp] app: Support NULL ext to file_utils_uri_with_new_ext()



commit d9136aec3f85e61c3fbbc76929356878295c5a23
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Jul 2 20:44:48 2009 +0200

    app: Support NULL ext to file_utils_uri_with_new_ext()

 app/file/file-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/app/file/file-utils.c b/app/file/file-utils.c
index cc06182..55329d2 100644
--- a/app/file/file-utils.c
+++ b/app/file/file-utils.c
@@ -238,7 +238,7 @@ file_utils_uri_with_new_ext (const gchar *uri,
                              const gchar *ext_uri)
 {
   const gchar *uri_ext      = file_utils_get_ext_start (uri);
-  const gchar *ext_uri_ext  = file_utils_get_ext_start (ext_uri);
+  const gchar *ext_uri_ext  = ext_uri ? file_utils_get_ext_start (ext_uri) : NULL;
   gchar *uri_without_ext    = g_strndup (uri, uri_ext - uri);
   gchar *ret                = g_strconcat (uri_without_ext, ext_uri_ext, NULL);
   g_free (uri_without_ext);



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