[java-atk-wrapper] Fix null dereference



commit 8ab50d1da2003b7e121ba69a6bca30693de92b05
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Sun Jul 28 00:03:06 2019 +0200

    Fix null dereference

 wrapper/org/GNOME/Accessibility/AtkComponent.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/wrapper/org/GNOME/Accessibility/AtkComponent.java 
b/wrapper/org/GNOME/Accessibility/AtkComponent.java
index 6f841ac..fb842e3 100644
--- a/wrapper/org/GNOME/Accessibility/AtkComponent.java
+++ b/wrapper/org/GNOME/Accessibility/AtkComponent.java
@@ -103,9 +103,13 @@ public class AtkComponent {
 
       if (coord_type == AtkCoordType.WINDOW) {
           Point window_origin = getWindowLocation(ac);
+          if (window_origin == null)
+              return null;
           Point parent_origin = parent_component.getLocationOnScreen();
+          if (parent_origin == null)
+              return null;
           parent_origin.translate(-window_origin.x, -window_origin.y);
-         return parent_origin;
+          return parent_origin;
       }
       return null;
   }


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