When cleaning duplicate modes, make sure ->Last is reset correctly.
When removing the very last mode for a monitor, move the ->Last pointer to the previous list element.
This commit is contained in:
parent
fab9a6b621
commit
d8c5dba4d7
|
|
@ -437,7 +437,11 @@ xf86PruneDuplicateMonitorModes (MonPtr Monitor)
|
|||
{
|
||||
next = clone->next;
|
||||
if (xf86ModesEqual (master, clone))
|
||||
{
|
||||
if (Monitor->Last == clone)
|
||||
Monitor->Last = clone->prev;
|
||||
xf86DeleteMode (&Monitor->Modes, clone);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue