From 4d0f35c81df307609b29c0f12aa1b4c6ee6fd8d2 Mon Sep 17 00:00:00 2001 From: Matthias Hopf Date: Fri, 2 Nov 2007 19:27:32 +0100 Subject: [PATCH] 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. --- hw/xfree86/modes/xf86Modes.c | 3 +-- 1 file changed, 1 insertion(+), 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; }