devilhorns pushed a commit to branch master.

commit aedd313704e0d9f863bcb3b1ffbff66771a6bfb1
Author: Chris Michael <[email protected]>
Date:   Wed Jun 5 18:21:55 2013 +0100

    Initialize 'win' to NULL and only return a window id if we have a
    valid 'win'
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/elm_cnp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index f80e63c..b9e4c44 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -2914,7 +2914,7 @@ static unsigned int
 _wl_elm_widget_window_get(Evas_Object *obj)
 {
    Evas_Object *top;
-   Ecore_Wl_Window *win;
+   Ecore_Wl_Window *win = NULL;
 
    top = elm_widget_top_get(obj);
    if (!top) top = elm_widget_top_get(elm_widget_parent_widget_get(obj));
@@ -2932,7 +2932,8 @@ _wl_elm_widget_window_get(Evas_Object *obj)
         win = ecore_evas_wayland_window_get(ee);
      }
 
-   return win->id;
+   if (win) return win->id;
+   return 0;
 }
 
 #endif

-- 

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j

Reply via email to