Skip to content

Commit cf53740

Browse files
authored
Merge pull request #365 from Xanthorapedia/patch-1
Be defensive checking menu path
2 parents f7eea88 + 00a3cf7 commit cf53740

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)