e_comp_screen: fix bug detected by static analysis tool 41/141541/3
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 1 Aug 2017 04:06:16 +0000 (13:06 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 1 Aug 2017 04:19:29 +0000 (04:19 +0000)
Change-Id: I11b49ef26511814bdff9fc0dd25ad23b203da85d

src/bin/e_comp_screen.c

index 40c38795b062bc110eeb16167107b9338809a39d..4b6a9da4f98ff838abcfa8f048f28063712440c2 100644 (file)
@@ -812,6 +812,7 @@ e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh)
    EINA_LIST_FOREACH(outputs, l, output)
      {
         screen = E_NEW(E_Screen, 1);
+        if (!screen) continue;
         screen->escreen = screen->screen = i;
         screen->x = output->config.geom.x;
         screen->y = output->config.geom.y;
@@ -847,6 +848,7 @@ e_comp_screen_e_screens_setup(E_Comp_Screen *e_comp_screen, int rw, int rh)
      {
 out:
         screen = E_NEW(E_Screen, 1);
+        if (!screen) return;
         screen->escreen = screen->screen = 0;
         screen->x = 0;
         screen->y = 0;