sna: Fix loop iteration whilst deleting connectors
If we remove a connector/output, we need to not advance the iterator or else we skip over an output (as the array is reduces inside the loop). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
8fd13a5207
commit
ef178f7d69
|
|
@ -2964,7 +2964,7 @@ void sna_mode_discover(struct sna *sna)
|
|||
for (i = 0; i < sna->mode.num_real_output; i++) {
|
||||
xf86OutputPtr output = config->output[i];
|
||||
if (to_sna_output(output)->serial != serial) {
|
||||
sna_output_del(output);
|
||||
sna_output_del(output); i--;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue