compositor-drm: handle null cursor_plane

Was crashing when I tried to take a screenshot.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Greg V 2018-02-19 17:59:42 +03:00 committed by Pekka Paalanen
parent d715784734
commit 1f7817613a
1 changed files with 4 additions and 2 deletions

View File

@ -1828,8 +1828,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) {