Re: Patch: fix weston crash (inline patch)

2014-12-11 Thread Pekka Paalanen
On Tue, 02 Dec 2014 13:02:55 -0500
Andrew Engelbrecht  wrote:

> On 12/02/2014 12:18 PM, Andrew Engelbrecht wrote:
> > I've attached a patch which fixes the crashing. I mimicked the code in
> > the block above it without knowing the overall impact, so it needs
> > review from a knowledgeable contributor.
> 
> here's the patch in non-attachment form:
> 
> diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
> index bdfac23..9284a05 100644
> --- a/xwayland/window-manager.c
> +++ b/xwayland/window-manager.c
> @@ -1326,7 +1326,9 @@ weston_wm_window_handle_state(struct
> weston_wm_window *window,
>   
> WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
>   0, NULL);
>   } else {
> - shell_interface->set_toplevel(window->shsurf);
> + if (window->shsurf)
> + shell_interface->set_toplevel(window->shsurf);
> +
>   window->width = window->saved_width;
>   window->height = window->saved_height;
>   if (window->frame)
> 

This looks fine to me. I fixed the commit message a bit, and pushed.

Next time would be nice if you used git-send-email.


Thanks,
pq
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: Patch: fix weston crash (inline patch)

2014-12-02 Thread Andrew Engelbrecht
On 12/02/2014 12:18 PM, Andrew Engelbrecht wrote:
> I've attached a patch which fixes the crashing. I mimicked the code in
> the block above it without knowing the overall impact, so it needs
> review from a knowledgeable contributor.

here's the patch in non-attachment form:

diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index bdfac23..9284a05 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -1326,7 +1326,9 @@ weston_wm_window_handle_state(struct
weston_wm_window *window,

WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
0, NULL);
} else {
-   shell_interface->set_toplevel(window->shsurf);
+   if (window->shsurf)
+   shell_interface->set_toplevel(window->shsurf);
+
window->width = window->saved_width;
window->height = window->saved_height;
if (window->frame)


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel