aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimidger <APragmaticPlace@gmail.com>2018-01-21 15:47:02 -0500
committerTimidger <APragmaticPlace@gmail.com>2018-01-21 15:47:02 -0500
commitf8b9f44ff53c25ad8feef1f2239b82c5e725c082 (patch)
treecb0445d87ba0da60d3fae27070d5007690b04a28
parent9d4ea146b66282e4cee6aedc8e0f27db3561d9a3 (diff)
Add con/crtc null check to move_cursor in drm
-rw-r--r--backend/drm/drm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index c3cdd9f8..47bd4e3a 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -634,6 +634,9 @@ static bool wlr_drm_connector_move_cursor(struct wlr_output *output,
int x, int y) {
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
struct wlr_drm_backend *drm = (struct wlr_drm_backend *)output->backend;
+ if (!conn || !conn->crtc) {
+ return false;
+ }
struct wlr_drm_plane *plane = conn->crtc->cursor;
struct wlr_box box;