aboutsummaryrefslogtreecommitdiff
path: root/libsylph/codeconv.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-06 09:12:08 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-10-06 09:12:08 +0000
commit5f667d42f46f4735b0e23c00467055fc7d93df8e (patch)
tree6ab96c1ab7d85bbd473625b63c54d246b479f5e5 /libsylph/codeconv.c
parent469c7a5cabfd8ad230bab13447a281ca296c5073 (diff)
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
Diffstat (limited to 'libsylph/codeconv.c')
-rw-r--r--libsylph/codeconv.c4
1 files changed, 4 insertions, 0 deletions
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",