Was crashing when I tried to take a screenshot.
---
On my slightly unconventional setup (FreeBSD amdgpu), after merging 
recent changes, pressing the screenshot hotkey was crashing weston.

Debugging revealed that cursor_plane was 0x0 here.
I don't know why exactly, but adding this check fixes it.

 libweston/compositor-drm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index ff090907..278bc02d 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -1830,8 +1830,10 @@ drm_output_apply_state_legacy(struct drm_output_state 
*state)
         */
        if (output->base.disable_planes) {
                output->cursor_view = NULL;
-               output->cursor_plane->base.x = INT32_MIN;
-               output->cursor_plane->base.y = INT32_MIN;
+               if (output->cursor_plane) {
+                       output->cursor_plane->base.x = INT32_MIN;
+                       output->cursor_plane->base.y = INT32_MIN;
+               }
        }
 
        if (state->dpms != WESTON_DPMS_ON) {
-- 
2.16.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to