Commit 2647e457 authored by Christian Persch's avatar Christian Persch Committed by Hiroyuki Ikezoe

Fix crash while saving as svg.

Part of fix for bug #591766.
The return value of basename should not be free. We can use
g_path_get_basename instead.
parent 62e1aca0
......@@ -183,7 +183,7 @@ AC_SUBST([LIBRSVG_HAVE_CSS],[$croco_define])
dnl ===========================================================================
AC_CHECK_FUNCS(strtok_r basename)
AC_CHECK_FUNCS(strtok_r)
dnl ===========================================================================
......
......@@ -30,10 +30,6 @@
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#ifdef HAVE_BASENAME
#include <libgen.h>
#endif
#ifdef ENABLE_XEMBED
#include <gdk/gdkx.h>
#endif /* ENABLE_XEMBED */
......@@ -44,12 +40,8 @@
static char *
_rsvg_basename (const char *file)
{
#ifdef HAVE_BASENAME
if (file && *file) {
char *file_dup = g_strdup (file);
return basename (file_dup);
}
#endif
if (file && *file)
return g_path_get_basename (file);
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment