Skip to content

Commit b6e3dce

Browse files
authored
Merge pull request #5384 from hazmatsuitor/master
fix NPE when closing sketch window on Mac (#5214)
2 parents e2b1c38 + ac041b9 commit b6e3dce

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

core/src/processing/core/PApplet.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3703,8 +3703,7 @@ public void dispose() {
37033703
if (platform == MACOSX) {
37043704
try {
37053705
final String td = "processing.core.ThinkDifferent";
3706-
final Class<?> thinkDifferent =
3707-
Thread.currentThread().getContextClassLoader().loadClass(td);
3706+
final Class<?> thinkDifferent = getClass().getClassLoader().loadClass(td);
37083707
thinkDifferent.getMethod("cleanup").invoke(null);
37093708
} catch (Exception e) {
37103709
e.printStackTrace();

0 commit comments

Comments
 (0)