diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-11-14 09:06:45 -0600 |
---|---|---|
committer | Mike Gorse <mgorse@suse.com> | 2015-11-14 09:12:13 -0600 |
commit | b3164deed659a56d3fff1ecce6cca74aef1159a0 (patch) | |
tree | 61690d0b1d246e667478f208dba770ea3f7e2521 /atspi/atspi-stateset.c | |
parent | 0927e42791b6f866088108bec829fdf3037bc456 (diff) | |
download | at-spi2-core-b3164deed659a56d3fff1ecce6cca74aef1159a0.tar.gz |
Don't crash when trying to set an invalid state
https://bugzilla.gnome.org/show_bug.cgi?id=757915
Diffstat (limited to 'atspi/atspi-stateset.c')
-rw-r--r-- | atspi/atspi-stateset.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/atspi/atspi-stateset.c b/atspi/atspi-stateset.c index 1f9d9931..366c48b4 100644 --- a/atspi/atspi-stateset.c +++ b/atspi/atspi-stateset.c @@ -102,11 +102,11 @@ atspi_state_set_set_by_name (AtspiStateSet *set, const gchar *name, gboolean ena { g_warning ("AT-SPI: Attempt to set unknown state '%s'", name); } - - if (enabled) - set->states |= ((gint64)1 << value->value); else - set->states &= ~((gint64)1 << value->value); + if (enabled) + set->states |= ((gint64)1 << value->value); + else + set->states &= ~((gint64)1 << value->value); g_type_class_unref (type_class); } |