diff --git a/core/src/processing/opengl/PSurfaceNEWT.java b/core/src/processing/opengl/PSurfaceNEWT.java index ce60dcf02..181da85de 100644 --- a/core/src/processing/opengl/PSurfaceNEWT.java +++ b/core/src/processing/opengl/PSurfaceNEWT.java @@ -297,6 +297,8 @@ public class PSurfaceNEWT implements PSurface { @Override public void windowDestroyNotify(final WindowEvent e) { animator.stop(); + PSurfaceNEWT.this.sketch.exit(); + window.destroy(); } });