Added rebuildToolList() to fix nullpointer in contributions check (#1381)

This commit is contained in:
Stef Tervelde
2026-01-16 15:55:14 +01:00
committed by GitHub
parent 02f8b39c1c
commit df585defc6
2 changed files with 13 additions and 8 deletions

View File

@@ -487,6 +487,7 @@ public class Base {
buildCoreModes();
rebuildContribModes();
rebuildContribExamples();
rebuildToolList();
// Needs to happen after the sketchbook folder has been located.
// Also relies on the modes to be loaded, so it knows what can be

View File

@@ -21,14 +21,6 @@
*/
package processing.app.contrib;
import java.awt.EventQueue;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.net.*;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
import processing.app.Base;
import processing.app.Messages;
import processing.app.UpdateCheck;
@@ -37,6 +29,16 @@ import processing.core.PApplet;
import processing.data.StringDict;
import processing.data.StringList;
import java.awt.*;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
public class ContributionListing {
static volatile ContributionListing singleInstance;
@@ -275,6 +277,8 @@ public class ContributionListing {
} catch (MalformedURLException e) {
progress.setException(e);
progress.finished();
} catch (Exception e) {
Messages.log(e.getMessage());
} finally {
downloadingLock.unlock();
}