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:
Chris Wilson 2014-05-05 09:37:56 +01:00
parent 8fd13a5207
commit ef178f7d69
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}