<div dir="ltr"><div>Look OK,<br><br></div>it can not hurt to add this check in any case.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 October 2014 22:46, Giulio Camuffo <span dir="ltr"><<a href="mailto:giuliocamuffo@gmail.com" target="_blank">giuliocamuffo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">the keyboard focus surface may not have a valid resource (server side<br>
surface or a surface surviving its client), so check if it is valid<br>
before using it.<br>
---<br>
 src/input.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/input.c b/src/input.c<br>
index e765221..bc58223 100644<br>
--- a/src/input.c<br>
+++ b/src/input.c<br>
@@ -1803,7 +1803,7 @@ seat_get_keyboard(struct wl_client *client, struct wl_resource *resource,<br>
                                           seat->keyboard->focus_serial);<br>
        }<br>
<br>
-       if (seat->keyboard->focus &&<br>
+       if (seat->keyboard->focus && seat->keyboard->focus->resource &&<br>
            wl_resource_get_client(seat->keyboard->focus->resource) == client) {<br>
                struct weston_surface *surface =<br>
                        (struct weston_surface *) seat->keyboard->focus;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.2<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br></div>