From ec9f9293b6fd425d8c722d2f0c68510dac73d46f Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Wed, 19 Aug 2015 06:01:11 -0400 Subject: [PATCH] avoid NPE in selectFolder() on OS X (fixed #3661) --- core/src/processing/core/PApplet.java | 4 +++- core/todo.txt | 20 ++++++++++++++------ todo.txt | 4 ++++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 8410a8fd6..16ce33caa 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -6368,7 +6368,9 @@ public class PApplet implements PConstants { if (platform == MACOSX && useNativeSelect != false) { FileDialog fileDialog = new FileDialog(parentFrame, prompt, FileDialog.LOAD); - fileDialog.setDirectory(defaultSelection.getAbsolutePath()); + if (defaultSelection != null) { + fileDialog.setDirectory(defaultSelection.getAbsolutePath()); + } System.setProperty("apple.awt.fileDialogForDirectories", "true"); fileDialog.setVisible(true); System.setProperty("apple.awt.fileDialogForDirectories", "false"); diff --git a/core/todo.txt b/core/todo.txt index 0fe001eaa..9849ca641 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,9 +1,23 @@ 0243 core (3.0b5) +X selectFolder broken (gives NullPointerException) +X https://github.com/processing/processing/issues/3661 + +cleaning +X How do images behave when pixelDensity(2) is set? +X https://github.com/processing/processing/issues/3364 +X retina sketches slow to start +X https://github.com/processing/processing/issues/2357 +X zero alpha values still a problem with retina renderer +X https://github.com/processing/processing/issues/2030 jakub X keyTyped() not firing with P2D and P3D X https://github.com/processing/processing/issues/3582 X https://github.com/processing/processing/pull/3652 +X rect() sizing in JavaFX +X https://github.com/processing/processing/pull/3656 +X FX - Proper sketch sizing +X https://github.com/processing/processing/pull/3658 known issues @@ -170,14 +184,8 @@ _ don't override the window icon w/ p5 logo if already set retina/hidpi -_ How do images behave when pixelDensity(2) is set? -_ https://github.com/processing/processing/issues/3364 _ no high-dpi support for core on Windows _ https://github.com/processing/processing/issues/2411 -_ retina sketches slow to start -_ https://github.com/processing/processing/issues/2357 -_ zero alpha values still a problem with retina renderer -_ https://github.com/processing/processing/issues/2030 decisions/misc diff --git a/todo.txt b/todo.txt index 69c5bb6a3..03e13e39d 100644 --- a/todo.txt +++ b/todo.txt @@ -38,6 +38,10 @@ _ Ready to add contributed example packages? _ https://github.com/processing/processing/issues/2953 _ sketch modified externally with FAT32 volumes on OS X _ https://github.com/processing/processing/issues/3387 +_ also appearing with encrypted volumes? +_ also an un-ending loop caused by it +_ https://github.com/processing/processing/issues/3650 +_ add this to the preferences? gui