devilhorns pushed a commit to branch master.

commit dd939bf58705f9bca5d00a52128e97f06d2c7384
Author: Chris Michael <[email protected]>
Date:   Tue Jul 16 11:16:08 2013 +0100

    Add some additional trapping around window_show for cases where a
    wl_shell has not been bound yet
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_wayland/ecore_wl_window.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_wayland/ecore_wl_window.c 
b/src/lib/ecore_wayland/ecore_wl_window.c
index a9fa926..34dfb3e 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -282,17 +282,21 @@ ecore_wl_window_show(Ecore_Wl_Window *win)
    if ((win->type != ECORE_WL_WINDOW_TYPE_DND) &&
        (win->type != ECORE_WL_WINDOW_TYPE_NONE))
      {
-        if (!win->shell_surface)
+        if ((!win->shell_surface) && (_ecore_wl_disp->wl.shell))
           {
              win->shell_surface = 
                wl_shell_get_shell_surface(_ecore_wl_disp->wl.shell, 
                                           win->surface);
           }
 
-        wl_shell_surface_add_listener(win->shell_surface, 
-                                      &_ecore_wl_shell_surface_listener, win);
+        if (win->shell_surface)
+          wl_shell_surface_add_listener(win->shell_surface, 
+                                        &_ecore_wl_shell_surface_listener, 
win);
      }
 
+   /* trap for valid shell surface */
+   if (!win->shell_surface) return;
+
    switch (win->type)
      {
       case ECORE_WL_WINDOW_TYPE_FULLSCREEN:

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to