rotation: add null check before copying previous rotation hints 40/69740/1
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 16 May 2016 11:48:30 +0000 (20:48 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 16 May 2016 11:48:30 +0000 (20:48 +0900)
Change-Id: I1ff256612c50227d441dc314ba1ef841e87406d2

src/rotation/e_mod_rotation_wl.c

index e2ff650..9e29b29 100644 (file)
@@ -1293,8 +1293,11 @@ _rot_hook_eval_fetch(void *d EINA_UNUSED, E_Client *ec)
 
         if (!rots)
           {
-             /* restore previous rotation hints */
-             memcpy(ec->e.state.rot.available_rots, _prev_rots, (sizeof(int) * _prev_count));
+             if (ec->e.state.rot.available_rots)
+               {
+                  /* restore previous rotation hints */
+                  memcpy(ec->e.state.rot.available_rots, _prev_rots, (sizeof(int) * _prev_count));
+               }
              goto end_fetch_rot;
           }