aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-11 08:34:46 +0200
committerSimon Ser <contact@emersion.fr>2020-05-14 10:20:37 +0200
commit42e485dcc306f386aa8d3b8907c77ea3316360d5 (patch)
tree8e9ec41c1f26d00469f3c2cbfbca2495e41e556a /backend/drm
parent8b18d389b3369a2797021ea6ede3b35e90edfb49 (diff)
backend/drm: fix segfault in drm_crtc_page_flip
When no cursor plane is available, drm_crtc_page_flip would segfault.
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 743cc291..d0f7a69e 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -359,7 +359,9 @@ static bool drm_crtc_page_flip(struct wlr_drm_connector *conn) {
conn->pageflip_pending = true;
drm_fb_move(&crtc->primary->queued_fb, &crtc->primary->pending_fb);
- drm_fb_move(&crtc->cursor->queued_fb, &crtc->cursor->pending_fb);
+ if (crtc->cursor != NULL) {
+ drm_fb_move(&crtc->cursor->queued_fb, &crtc->cursor->pending_fb);
+ }
wlr_output_update_enabled(&conn->output, true);
return true;
}