| Message ID | 20180419071323.31294-1-ofourdan@redhat.com |
|---|---|
| State | Accepted |
| Commit | 3b4671f9e9c85f23e7593652e1482b11dc3ad4af |
| Headers | show |
| Series |
"xwayland: avoid using freed xwl_window on unrealize"
( rev:
3
)
in
X.org (DEPRECATED - USE GITLAB) |
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index e835a1399..c41a8a2d1 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -77,7 +77,7 @@ xwl_present_cleanup(struct xwl_window *xwl_window, WindowPtr window) { struct xwl_present_event *event, *tmp; - if (xwl_window->present_window == window) { + if (xwl_window->present_window == window || xwl_window->window == window) { if (xwl_window->present_frame_callback) { wl_callback_destroy(xwl_window->present_frame_callback); xwl_window->present_frame_callback = NULL;
Reviewed-by: Roman Gilg <subdiff@gmail.com> On Thu, Apr 19, 2018 at 9:13 AM, Olivier Fourdan <ofourdan@redhat.com> wrote: > Regardless of the order we un-realize windows. > > Suggested-by: Roman Gilg <subdiff@gmail.com> > Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> > --- > hw/xwayland/xwayland-present.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c > index e835a1399..c41a8a2d1 100644 > --- a/hw/xwayland/xwayland-present.c > +++ b/hw/xwayland/xwayland-present.c > @@ -77,7 +77,7 @@ xwl_present_cleanup(struct xwl_window *xwl_window, WindowPtr window) > { > struct xwl_present_event *event, *tmp; > > - if (xwl_window->present_window == window) { > + if (xwl_window->present_window == window || xwl_window->window == window) { > if (xwl_window->present_frame_callback) { > wl_callback_destroy(xwl_window->present_frame_callback); > xwl_window->present_frame_callback = NULL; > -- > 2.17.0 >
Regardless of the order we un-realize windows. Suggested-by: Roman Gilg <subdiff@gmail.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> --- hw/xwayland/xwayland-present.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)