bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=903099c021009fcbec0b4d3dee9dfd5949889684

commit 903099c021009fcbec0b4d3dee9dfd5949889684
Author: Marcel Hollerbach <marcel-hollerb...@t-online.de>
Date:   Thu Dec 10 11:43:42 2015 +0100

    e_randr2: Add NULL check
    
    e crashed for me when starting the screen configure tool.
    Adding the NULL check here fixes that.
---
 src/modules/conf_randr/e_int_config_randr2.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/modules/conf_randr/e_int_config_randr2.c 
b/src/modules/conf_randr/e_int_config_randr2.c
index 6104867..8af6f96 100644
--- a/src/modules/conf_randr/e_int_config_randr2.c
+++ b/src/modules/conf_randr/e_int_config_randr2.c
@@ -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;

-- 


Reply via email to