diff --git a/hw/xfree86/parser/Flags.c b/hw/xfree86/parser/Flags.c index b4e8d25..5dc079e 100644 --- a/hw/xfree86/parser/Flags.c +++ b/hw/xfree86/parser/Flags.c @@ -239,7 +239,8 @@ xf86optionListDup (XF86OptionPtr opt) while (opt) { newopt = xf86addNewOption(newopt, strdup(opt->opt_name), - strdup(opt->opt_val)); + (opt->opt_val != NULL)? + strdup(opt->opt_val):NULL); newopt->opt_used = opt->opt_used; if (opt->opt_comment) newopt->opt_comment = strdup(opt->opt_comment);