[PATCH weston 2/3] shell: fix crash when no pointer device

Pekka Paalanen ppaalanen at gmail.com
Thu Jun 7 05:07:06 PDT 2012


Signed-off-by: Pekka Paalanen <ppaalanen at gmail.com>
---
 src/shell.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index e25bf71..85395c4 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -2781,8 +2781,9 @@ shell_init(struct weston_compositor *ec)
 		return -1;
 
 	shell->pointer_focus_listener.notify = handle_pointer_focus;
-	wl_signal_add(&ec->seat->seat.pointer->focus_signal,
-		      &shell->pointer_focus_listener);
+	if (ec->seat->seat.pointer)
+		wl_signal_add(&ec->seat->seat.pointer->focus_signal,
+			      &shell->pointer_focus_listener);
 
 	shell_add_bindings(ec, shell);
 
-- 
1.7.3.4



More information about the wayland-devel mailing list