[gtk/ebassi/for-master: 1/8] a11y: Different value types cannot be equal




commit 701a0dabd0a911ced7907da30eec851723f20f5e
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Aug 25 16:32:49 2020 +0100

    a11y: Different value types cannot be equal
    
    Bail out early, instead of going deep into the GtkAccessibleValue type
    equal() implementation, where we expect both accessible values to have
    the same type.

 gtk/gtkaccessiblevalue.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkaccessiblevalue.c b/gtk/gtkaccessiblevalue.c
index 5ea1db0488..2cefba0bc4 100644
--- a/gtk/gtkaccessiblevalue.c
+++ b/gtk/gtkaccessiblevalue.c
@@ -185,6 +185,9 @@ gtk_accessible_value_equal (const GtkAccessibleValue *value_a,
   if (value_a == NULL || value_b == NULL)
     return FALSE;
 
+  if (value_a->value_class != value_b->value_class)
+    return FALSE;
+
   if (value_a->value_class->equal == NULL)
     return FALSE;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]