Always duplicate mode name when duplicating a mode.
If the originating mode didn't have a name, we would end up with the name of the original mode being setup correctly, but with the name of the copy still being NULL.
This commit is contained in:
parent
dfb1cce28a
commit
4d0f35c81d
|
@ -196,9 +196,8 @@ xf86DuplicateMode(DisplayModePtr pMode)
|
|||
pNew->prev = NULL;
|
||||
if (pNew->name == NULL) {
|
||||
xf86SetModeDefaultName(pMode);
|
||||
} else {
|
||||
pNew->name = xnfstrdup(pMode->name);
|
||||
}
|
||||
pNew->name = xnfstrdup(pMode->name);
|
||||
|
||||
return pNew;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user