diff options
author | emersion <contact@emersion.fr> | 2018-01-15 13:41:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-15 13:41:58 +0100 |
commit | 38887a09dc24c662f5f2530d225d89d5fd73f32b (patch) | |
tree | a060de6c6a1118e0b6dd32fbc03b1d3730e8d25f | |
parent | e46d2dd0f884c96bb535c280a6ec9ea616d39b5c (diff) | |
parent | 3101c300b1b60bf47e7dd8032aff4da88a7b9e36 (diff) | |
download | wlroots-38887a09dc24c662f5f2530d225d89d5fd73f32b.tar.xz |
Merge pull request #564 from agx/master
Don't crash if crtc->cursor is NULL
-rw-r--r-- | backend/drm/atomic.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index e7374a00..64fae6e4 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -167,6 +167,10 @@ bool legacy_crtc_move_cursor(struct wlr_drm_backend *drm, static bool atomic_crtc_move_cursor(struct wlr_drm_backend *drm, struct wlr_drm_crtc *crtc, int x, int y) { + if (!crtc || !crtc->cursor) { + return true; + } + struct wlr_drm_plane *plane = crtc->cursor; // We can't use atomic operations on fake planes if (plane->id == 0) { |