backend/drm: fix segfault in drm_crtc_page_flip

When no cursor plane is available, drm_crtc_page_flip would segfault.
This commit is contained in:
Simon Ser 2020-05-11 08:34:46 +02:00
parent 8b18d389b3
commit 42e485dcc3

View file

@ -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;
}