diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-11 08:34:46 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-14 10:20:37 +0200 |
commit | 42e485dcc306f386aa8d3b8907c77ea3316360d5 (patch) | |
tree | 8e9ec41c1f26d00469f3c2cbfbca2495e41e556a /backend | |
parent | 8b18d389b3369a2797021ea6ede3b35e90edfb49 (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')
-rw-r--r-- | backend/drm/drm.c | 4 |
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; } |