Decrement mode count when removing RandR output mode.

Removing an output mode without decrementing the mode count scrambles the
output mode array badly.
This commit is contained in:
Keith Packard 2007-08-07 12:44:19 -07:00
parent fef4c7a6f1
commit 2b93cbb5f8

View File

@ -249,6 +249,7 @@ RROutputDeleteUserMode (RROutputPtr output,
memmove (output->userModes + m, output->userModes + m + 1,
(output->numUserModes - m - 1) * sizeof (RRModePtr));
output->numUserModes--;
RRModeDestroy (mode);
return Success;
}