mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Fixed NPE when import menu are empty
This commit is contained in:
parent
56b9f1cd6f
commit
17115b0a9b
@ -988,6 +988,8 @@ public class Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void rebuildImportMenu(JMenu importMenu) {
|
public void rebuildImportMenu(JMenu importMenu) {
|
||||||
|
if (importMenu == null)
|
||||||
|
return;
|
||||||
importMenu.removeAll();
|
importMenu.removeAll();
|
||||||
|
|
||||||
JMenuItem addLibraryMenuItem = new JMenuItem(_("Add Library..."));
|
JMenuItem addLibraryMenuItem = new JMenuItem(_("Add Library..."));
|
||||||
@ -1035,6 +1037,8 @@ public class Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void rebuildExamplesMenu(JMenu menu) {
|
public void rebuildExamplesMenu(JMenu menu) {
|
||||||
|
if (menu == null)
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
menu.removeAll();
|
menu.removeAll();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user