summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Hopf <mhopf@suse.de>2007-11-02 19:27:32 +0100
committerMatthias Hopf <mhopf@suse.de>2007-11-02 19:27:32 +0100
commit4d0f35c81df307609b29c0f12aa1b4c6ee6fd8d2 (patch)
treefee2472cb4513d071f721820d202fa5f81ab9c12
parentdfb1cce28ac07d412598f7b9ab2ee908978b38e7 (diff)
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.
-rw-r--r--hw/xfree86/modes/xf86Modes.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/xfree86/modes/xf86Modes.c b/hw/xfree86/modes/xf86Modes.c
index 99817898a..3879b9103 100644
--- a/hw/xfree86/modes/xf86Modes.c
+++ b/hw/xfree86/modes/xf86Modes.c
@@ -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;
}