devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=9b7358aa32a44a1b40459358afbc7bf9c0429939

commit 9b7358aa32a44a1b40459358afbc7bf9c0429939
Author: Chris Michael <[email protected]>
Date:   Tue Apr 21 09:36:00 2015 -0400

    e-comp-wl: Don't crash if we fail to create a new e_client
    
    This "should" fix T2344 crashing, however I suppose a better question
    is ... why is e_client_new returning NULL when it Does find the client
    already in the hash...
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/bin/e_comp_wl.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index a671197..aca9abd 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1395,11 +1395,13 @@ _e_comp_wl_compositor_cb_surface_create(struct 
wl_client *client, struct wl_reso
      }
    DBG("\tUsing Pixmap: %p", ep);
 
-   ec = e_client_new(ep, 0, 0);
-   ec->new_client = 0;
-   e_comp->new_clients--;
-   ec->client.w = ec->client.h = 1;
-   ec->ignored = 1;
+   if ((ec = e_client_new(ep, 0, 0)))
+     {
+        ec->new_client = 0;
+        e_comp->new_clients--;
+        ec->client.w = ec->client.h = 1;
+        ec->ignored = 1;
+     }
 
    /* set reference to pixmap so we can fetch it later */
    wl_resource_set_user_data(res, ep);

-- 


Reply via email to