[at-spi2-core] Don't crash when trying to set an invalid state
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-core] Don't crash when trying to set an invalid state
- Date: Sat, 14 Nov 2015 15:10:20 +0000 (UTC)
commit b3164deed659a56d3fff1ecce6cca74aef1159a0
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Sat Nov 14 09:06:45 2015 -0600
Don't crash when trying to set an invalid state
https://bugzilla.gnome.org/show_bug.cgi?id=757915
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 1f9d993..366c48b 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]