Skip to content

Commit df585de

Browse files
authored
Added rebuildToolList() to fix nullpointer in contributions check (#1381)
1 parent 02f8b39 commit df585de

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

app/src/processing/app/Base.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,7 @@ public Base(String[] args) throws Exception {
487487
buildCoreModes();
488488
rebuildContribModes();
489489
rebuildContribExamples();
490+
rebuildToolList();
490491

491492
// Needs to happen after the sketchbook folder has been located.
492493
// Also relies on the modes to be loaded, so it knows what can be

app/src/processing/app/contrib/ContributionListing.java

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@
2121
*/
2222
package processing.app.contrib;
2323

24-
import java.awt.EventQueue;
25-
import java.io.File;
26-
import java.lang.reflect.InvocationTargetException;
27-
import java.net.*;
28-
import java.util.*;
29-
import java.util.concurrent.ConcurrentHashMap;
30-
import java.util.concurrent.locks.ReentrantLock;
31-
3224
import processing.app.Base;
3325
import processing.app.Messages;
3426
import processing.app.UpdateCheck;
@@ -37,6 +29,16 @@
3729
import processing.data.StringDict;
3830
import processing.data.StringList;
3931

32+
import java.awt.*;
33+
import java.io.File;
34+
import java.lang.reflect.InvocationTargetException;
35+
import java.net.MalformedURLException;
36+
import java.net.URL;
37+
import java.util.*;
38+
import java.util.List;
39+
import java.util.concurrent.ConcurrentHashMap;
40+
import java.util.concurrent.locks.ReentrantLock;
41+
4042

4143
public class ContributionListing {
4244
static volatile ContributionListing singleInstance;
@@ -275,6 +277,8 @@ public void downloadAvailableList(final Base base,
275277
} catch (MalformedURLException e) {
276278
progress.setException(e);
277279
progress.finished();
280+
} catch (Exception e) {
281+
Messages.log(e.getMessage());
278282
} finally {
279283
downloadingLock.unlock();
280284
}

0 commit comments

Comments
 (0)