From 5f667d42f46f4735b0e23c00467055fc7d93df8e Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 6 Oct 2005 09:12:08 +0000 Subject: conv_filename_from_utf8(), conv_filename_to_utf8(): put an assertion. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@626 ee746299-78ed-0310-b773-934348b2243d --- libsylph/codeconv.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libsylph/codeconv.c') diff --git a/libsylph/codeconv.c b/libsylph/codeconv.c index 20378fb8..830ebcce 100644 --- a/libsylph/codeconv.c +++ b/libsylph/codeconv.c @@ -1981,6 +1981,8 @@ gchar *conv_filename_from_utf8(const gchar *utf8_file) gchar *fs_file; GError *error = NULL; + g_return_val_if_fail(utf8_file != NULL, NULL); + fs_file = g_filename_from_utf8(utf8_file, -1, NULL, NULL, &error); if (error) { g_warning("failed to convert encoding of file name: %s\n", @@ -1998,6 +2000,8 @@ gchar *conv_filename_to_utf8(const gchar *fs_file) gchar *utf8_file; GError *error = NULL; + g_return_val_if_fail(fs_file != NULL, NULL); + utf8_file = g_filename_to_utf8(fs_file, -1, NULL, NULL, &error); if (error) { g_warning("failed to convert encoding of file name: %s\n", -- cgit v1.2.3