devilhorns pushed a commit to branch master.
commit ca1b15918d4fc00765dda68d7a16d370b5ef9e27
Author: Chris Michael <[email protected]>
Date: Sat May 4 14:35:01 2013 +0100
Test for valid Wayland compositor before trying to shutdown.
Signed-off-by: Chris Michael <[email protected]>
---
src/bin/e_comp_wl.c | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index ee250bc..4484c9b 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -294,32 +294,35 @@ e_comp_wl_shutdown(void)
{
E_Module *mod = NULL;
- /* remove the idler */
- if (_e_wl_comp->idler) ecore_idler_del(_e_wl_comp->idler);
+ if (_e_wl_comp)
+ {
+ /* remove the idler */
+ if (_e_wl_comp->idler) ecore_idler_del(_e_wl_comp->idler);
- /* remove the fd handler */
- if (_e_wl_comp->fd_handler)
- ecore_main_fd_handler_del(_e_wl_comp->fd_handler);
+ /* remove the fd handler */
+ if (_e_wl_comp->fd_handler)
+ ecore_main_fd_handler_del(_e_wl_comp->fd_handler);
- /* shutdown input */
- _e_comp_wl_input_shutdown();
+ /* shutdown input */
+ _e_comp_wl_input_shutdown();
#ifdef HAVE_WAYLAND_EGL
- /* unbind wayland display */
- if (_e_wl_comp->egl.bound)
- _e_wl_comp->egl.unbind_display(_e_wl_comp->egl.display,
_e_wl_comp->wl.display);
+ /* unbind wayland display */
+ if (_e_wl_comp->egl.bound)
+ _e_wl_comp->egl.unbind_display(_e_wl_comp->egl.display,
_e_wl_comp->wl.display);
- /* terminate the egl display */
- if (_e_wl_comp->egl.display) eglTerminate(_e_wl_comp->egl.display);
+ /* terminate the egl display */
+ if (_e_wl_comp->egl.display) eglTerminate(_e_wl_comp->egl.display);
- eglReleaseThread();
+ eglReleaseThread();
#endif
- /* if we have a display, destroy it */
- if (_e_wl_comp->wl.display) wl_display_destroy(_e_wl_comp->wl.display);
+ /* if we have a display, destroy it */
+ if (_e_wl_comp->wl.display) wl_display_destroy(_e_wl_comp->wl.display);
- /* free the compositor */
- E_FREE(_e_wl_comp);
+ /* free the compositor */
+ E_FREE(_e_wl_comp);
+ }
/* disable the loaded shell module */
/* TODO: we should have a config variable somewhere to store which
--
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may