e_policy_visibility: fix svace deref after null and correct coding convention 54/118754/3
authorJuyeon Lee <juyeonne.lee@samsung.com>
Tue, 14 Mar 2017 03:41:11 +0000 (12:41 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 14 Mar 2017 03:45:07 +0000 (20:45 -0700)
Change-Id: Ieadc92183e148c3a14fdd0f559bd0d0878088944

src/bin/e_policy_visibility.c

index 426d338d5f1914bd8db6e77db543d83e8720e803..0d9d4091d9953ebb7e53554f25656c508236c599 100644 (file)
@@ -1079,15 +1079,18 @@ _e_vis_ec_job_exec(E_Client *ec, E_Vis_Job_Type type)
    VS_DBG(ec, "Job Run: type %d", type);
 
    E_Vis_Client *vc = NULL;
-   if (ec) {
-        if (EINA_LIKELY(pol_vis != NULL)) {
+   if (ec)
+     {
+        if (EINA_LIKELY(pol_vis != NULL))
+          {
              vc = eina_hash_find(pol_vis->clients_hash, &ec);
-        }
-   }
+          }
+     }
 
    switch (type)
      {
       case E_VIS_JOB_TYPE_ACTIVATE:
+         if (!ec) break;
          e_client_activate(ec, 1);
          if (e_policy_client_is_lockscreen(ec))
            e_policy_stack_clients_restack_above_lockscreen(ec, EINA_TRUE);