changeset 4290:233be46d9596

RT-29421: [parfait] Graphics: Null pointer dereference in rt/glass/glass-lib-macosx/src/GlassWindow.m Reviewed-by: anthony, art
author Petr Pchelko <petr.pchelko@oracle.com>
date Mon, 15 Jul 2013 15:38:24 +0400
parents 8091df24a8e5
children f5a3e0dfc93a
files modules/graphics/src/main/java/com/sun/glass/ui/Window.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/glass/ui/Window.java	Mon Jul 15 12:19:04 2013 +0200
+++ b/modules/graphics/src/main/java/com/sun/glass/ui/Window.java	Mon Jul 15 15:38:24 2013 +0400
@@ -288,7 +288,9 @@
     public void close() {
         Application.checkEventThread();
         if (this.view != null) {
-            _setView(this.ptr, null);
+            if (this.ptr != 0L) {
+                _setView(this.ptr, null);
+            }
             this.view.setWindow(null);
             this.view.close();
             this.view = null;