[gvfs] cdda: Fix warnings for each track on the CD
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] cdda: Fix warnings for each track on the CD
- Date: Thu, 14 Mar 2013 22:03:30 +0000 (UTC)
commit 7855cb474a061b0908a2fa8f4b3687f1d9759e97
Author: Bastien Nocera <hadess hadess net>
Date: Thu Mar 14 11:38:47 2013 +0100
cdda: Fix warnings for each track on the CD
(process:22937): GLib-CRITICAL **: g_convert: assertion `str != NULL' failed
for each of the tracks as we tried to convert the genre (which was NULL)
https://bugzilla.gnome.org/show_bug.cgi?id=695835
daemon/gvfsbackendcdda.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsbackendcdda.c b/daemon/gvfsbackendcdda.c
index 11c6aea..a8213a8 100644
--- a/daemon/gvfsbackendcdda.c
+++ b/daemon/gvfsbackendcdda.c
@@ -161,6 +161,9 @@ release_metadata (GVfsBackendCdda *cdda_backend)
static char *
cdtext_string_to_utf8 (const char *string)
{
+ if (string == NULL)
+ return NULL;
+
/* CD-text doesn't specify encoding. In case outside ascii, assume latin-1. */
return g_convert (string, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]