[file-roller/gnome-3-20] libarchive: don't convert null strings to utf8
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller/gnome-3-20] libarchive: don't convert null strings to utf8
- Date: Sat, 18 Feb 2017 08:37:42 +0000 (UTC)
commit 5bd01758d57e2c020a692978c96fc304958f6a60
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Feb 18 08:52:54 2017 +0100
libarchive: don't convert null strings to utf8
src/fr-archive-libarchive.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
index 1c04d0f..0658d23 100644
--- a/src/fr-archive-libarchive.c
+++ b/src/fr-archive-libarchive.c
@@ -321,7 +321,7 @@ _g_error_new_from_archive_error (const char *s)
char *msg;
GError *error;
- msg = g_locale_to_utf8 (s, -1, NULL, NULL, NULL);
+ msg = (s != NULL) ? g_locale_to_utf8 (s, -1, NULL, NULL, NULL) : NULL;
if (msg == NULL)
msg = g_strdup ("Fatal error");
error = g_error_new_literal (FR_ERROR, FR_ERROR_COMMAND_ERROR, msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]