projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72a8282
)
Check that error exists before trying to set it. Fixes bug #640975.
author
Ignacio Casal Quinteiro
<icq@gnome.org>
Mon, 31 Jan 2011 12:34:26 +0000
(13:34 +0100)
committer
Ignacio Casal Quinteiro
<icq@gnome.org>
Mon, 31 Jan 2011 12:34:26 +0000
(13:34 +0100)
glib/gconvert.c
patch
|
blob
|
history
diff --git
a/glib/gconvert.c
b/glib/gconvert.c
index
52a3dd8
..
b363bca
100644
(file)
--- a/
glib/gconvert.c
+++ b/
glib/gconvert.c
@@
-769,13
+769,14
@@
g_convert_with_iconv (const gchar *str,
have_error = TRUE;
break;
default:
- {
- int errsv = errno;
-
- g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- _("Error during conversion: %s"),
- g_strerror (errsv));
- }
+ if (error)
+ {
+ int errsv = errno;
+
+ g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
+ _("Error during conversion: %s"),
+ g_strerror (errsv));
+ }
have_error = TRUE;
break;
}