main: tighten future qio switch check

This commit is contained in:
Thomas Schoebel-Theuer 2022-06-02 10:59:10 +02:00 committed by Thomas Schoebel-Theuer
parent e01d5ac272
commit af157b6010

View File

@ -1999,7 +1999,9 @@ int __make_copy(struct mars_dent *belongs,
/* do not change names underway */
if (copy && copy->inputs[i] && copy->inputs[i]->connect) {
aio = copy->inputs[i]->connect->brick;
if (aio && aio->power.button)
if (aio &&
aio->power.button &&
aio->power.led_on)
goto found;
}