Fixed adding an entry without specifying an index (this simplifies peer

logic)
This commit is contained in:
nathan 2017-07-11 01:28:03 +02:00
parent 9bf01aaf04
commit 0279fb2852

View File

@ -269,6 +269,7 @@ class Menu extends MenuItem {
synchronized (menuEntries) {
// access on this object must be synchronized for object visibility
if (index == -1) {
index = menuEntries.size();
menuEntries.add(entry);
} else {
if (!menuEntries.isEmpty() && menuEntries.get(0) instanceof Status) {