Fix null dereference issue
authorVivek Ellur <vivek.ellur@samsung.com>
Tue, 10 Nov 2015 17:26:48 +0000 (12:26 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 10 Nov 2015 17:26:48 +0000 (12:26 -0500)
Summary:
@Fix
possible null dereference issue while referencing cs2->id. So added a condition
to check it

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
Reviewers: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3309

src/modules/conf_randr/e_int_config_randr2.c

index 97aa9eb..ac9ea88 100644 (file)
@@ -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)
                {