changeset 6933:ae3e1b4c7dec

workaround to avoid segfault when producing parfait report
author Felipe Heidrich <felipe.heidrich@oracle.com>
date Thu, 01 May 2014 14:58:35 -0700
parents 9fb43da24248
children 7944afc1542c
files modules/graphics/src/main/native-glass/mac/GlassAccessible.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/native-glass/mac/GlassAccessible.m	Thu May 01 13:24:06 2014 -0400
+++ b/modules/graphics/src/main/native-glass/mac/GlassAccessible.m	Thu May 01 14:58:35 2014 -0700
@@ -237,7 +237,10 @@
         for (CFIndex index = 0; index < size; index++) {
             jobject element = (*env)->GetObjectArrayElement(env, srcArray, index);
             if ((*env)->ExceptionCheck(env)) return NULL;
-            [array addObject: variantToID(env, element)];
+            id variant = variantToID(env, element);
+            if (variant) {
+                [array addObject: variant];
+            }
         }
         return array;
     }