From dbfa9682bbc1f0993860d951da85c4b305ee9ae9 Mon Sep 17 00:00:00 2001 From: Vivek Ellur Date: Tue, 10 Nov 2015 12:26:48 -0500 Subject: [PATCH] Fix null dereference issue Summary: @Fix possible null dereference issue while referencing cs2->id. So added a condition to check it Signed-off-by: Vivek Ellur Reviewers: zmike Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D3309 --- 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 97aa9ebb4..ac9ea88dc 100644 --- a/src/modules/conf_randr/e_int_config_randr2.c +++ b/src/modules/conf_randr/e_int_config_randr2.c @@ -390,8 +390,11 @@ _cb_rel_to_set(void *data, Evas_Object *obj, void *event) if (it == event) { E_Config_Randr2_Screen *cs2 = _config_screen_n_find(cfdata, i); - printf("find cs = %p\n", cs2); - printf("cs id = %s\n", cs2->id); + if (cs2) + { + printf("find cs = %p\n", cs2); + printf("cs id = %s\n", cs2->id); + } if (cs2 == cs) return; if (cs2) {