1
0
Fork 0

Add missing safety check to prevent error when clicking DUPLICATE item that doesn't exist

This commit is contained in:
Jonathan Redpath 2021-10-26 23:24:48 +01:00
parent 930b0cda7e
commit b63c443d3d

View file

@ -134,6 +134,11 @@ var duplicateNamesPage = {
}
},
pushButtonLeft: func(indexSelect) {
if (indexSelect > size(me.vector)) {
mcdu_message(me.computer, "NOT ALLOWED");
return;
}
if (!dirToFlag) {
if (!me.flagPBD and !me.flagPROG) {
if (size(me.vector[0].id) == 5) {