e_randr2: Add NULL check

e crashed for me when starting the screen configure tool.
Adding the NULL check here fixes that.
This commit is contained in:
Marcel Hollerbach 2015-12-10 11:43:42 +01:00
parent b5aa0310f9
commit 903099c021
1 changed files with 5 additions and 2 deletions

View File

@ -81,8 +81,11 @@ _create_data(E_Config_Dialog *cfd EINA_UNUSED)
E_Config_Dialog_Data *cfdata;
if (!(cfdata = E_NEW(E_Config_Dialog_Data, 1))) return NULL;
cfdata->params = strdup(cfd->data);
if (cfd->data) cfdata->restore = e_randr2_cfg->restore;
if (cfd->data)
{
cfdata->restore = e_randr2_cfg->restore;
cfdata->params = strdup(cfd->data);
}
cfdata->hotplug = !e_randr2_cfg->ignore_hotplug_events;
cfdata->acpi = !e_randr2_cfg->ignore_acpi_events;
return cfdata;