Skip to content

Commit 17115b0

Browse files
committed
Fixed NPE when import menu are empty
1 parent 56b9f1c commit 17115b0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/processing/app/Base.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,8 @@ public LibraryList getUserLibs() {
988988
}
989989

990990
public void rebuildImportMenu(JMenu importMenu) {
991+
if (importMenu == null)
992+
return;
991993
importMenu.removeAll();
992994

993995
JMenuItem addLibraryMenuItem = new JMenuItem(_("Add Library..."));
@@ -1035,6 +1037,8 @@ public void actionPerformed(ActionEvent e) {
10351037
}
10361038

10371039
public void rebuildExamplesMenu(JMenu menu) {
1040+
if (menu == null)
1041+
return;
10381042
try {
10391043
menu.removeAll();
10401044

0 commit comments

Comments
 (0)