ensure clients possess comp_data before dereferencing it during x11 stacking
authorMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 21 Jul 2015 18:34:11 +0000 (14:34 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 21 Jul 2015 18:34:11 +0000 (14:34 -0400)
ref T2566

src/bin/e_comp_x.c

index 556cc07..7bf14db 100644 (file)
@@ -677,7 +677,7 @@ _e_comp_x_client_stack(E_Client *ec)
    ecore_x_window_shadow_tree_flush();
 
    /* try stacking below */
-   if (e_comp->nocomp_ec && (ec != e_comp->nocomp_ec))
+   if (e_comp->nocomp_ec && e_comp->nocomp_ec->comp_data && (ec != e_comp->nocomp_ec))
      win = _e_comp_x_client_window_get(e_comp->nocomp_ec);
    else
      {
@@ -685,7 +685,7 @@ _e_comp_x_client_stack(E_Client *ec)
         do
           {
              ec2 = e_client_above_get(ec2);
-             if (ec2 && e_client_has_xwindow(ec2) && (!ec2->new_client) &&
+             if (ec2 && e_client_has_xwindow(ec2) && ec2->comp_data && (!ec2->new_client) &&
                  (e_client_is_stacking(ec2) || ((!ec2->override) || ec2->internal)))
                {
                   if (ec2->layer != ec->layer) break;
@@ -702,7 +702,7 @@ _e_comp_x_client_stack(E_Client *ec)
         do
           {
              ec2 = e_client_below_get(ec2);
-             if (ec2 && e_client_has_xwindow(ec2) && (!ec2->new_client) &&
+             if (ec2 && e_client_has_xwindow(ec2) && ec2->comp_data && (!ec2->new_client) &&
                  (e_client_is_stacking(ec2) || ((!ec2->override) || ec2->internal)))
                {
                   if (ec2->layer != ec->layer) break;