diff options
author | Benjamin Otte <otte@redhat.com> | 2016-03-20 05:43:02 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-03-20 05:43:02 +0100 |
commit | 318a9c4634c7ac2eb8f46d29a1b1f32ae5f1ab5a (patch) | |
tree | 34af5e6fef395479fc8aaaa2fa6594d402ba5f1b | |
parent | 8cebc125da7e3f9c49a6d4e0ea5320c11b7c21af (diff) | |
download | gtk+-318a9c4634c7ac2eb8f46d29a1b1f32ae5f1ab5a.tar.gz |
x11: Use g_error_matches()
Fixes accidentally assigning values.
http://www.viva64.com/en/b/0383/
-rw-r--r-- | gdk/x11/gdkselection-x11.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c index b84be26664..c4e73227e3 100644 --- a/gdk/x11/gdkselection-x11.c +++ b/gdk/x11/gdkselection-x11.c @@ -738,8 +738,7 @@ gdk_x11_display_utf8_to_compound_text (GdkDisplay *display, if (!locale_str) { - if (!(error->domain = G_CONVERT_ERROR && - error->code == G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) + if (!g_error_matches (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE)) { g_warning ("Error converting from UTF-8 to '%s': %s", charset, error->message); |