Fixed adding an entry without specifying an index (this simplifies peer
logic)
This commit is contained in:
parent
9bf01aaf04
commit
0279fb2852
|
@ -269,6 +269,7 @@ class Menu extends MenuItem {
|
||||||
synchronized (menuEntries) {
|
synchronized (menuEntries) {
|
||||||
// access on this object must be synchronized for object visibility
|
// access on this object must be synchronized for object visibility
|
||||||
if (index == -1) {
|
if (index == -1) {
|
||||||
|
index = menuEntries.size();
|
||||||
menuEntries.add(entry);
|
menuEntries.add(entry);
|
||||||
} else {
|
} else {
|
||||||
if (!menuEntries.isEmpty() && menuEntries.get(0) instanceof Status) {
|
if (!menuEntries.isEmpty() && menuEntries.get(0) instanceof Status) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user