Skip to content

Commit 00a3cf7

Browse files
Be defensive checking menu path
1 parent 9fcb52c commit 00a3cf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/menu/ShadowMenu.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ public <T> T[] toArray(final T[] a) {
493493
// -- Helper methods --
494494

495495
private ShadowMenu addInternal(final ModuleInfo o) {
496-
if (o.getMenuPath().isEmpty()) return null; // no menu
496+
if (o.getMenuPath() == null || o.getMenuPath().isEmpty()) return null; // no menu
497497
return addChild(o, 0);
498498
}
499499

0 commit comments

Comments
 (0)