From ac25052c227e1c0d04a52db053c2c6156790aece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 25 Aug 2014 15:22:21 +0200 Subject: [PATCH] [kwin_wayland] Safety check for WaylandSeat::installCursorImage wl_cursor_theme_get_cursor might return a null pointer - return instead of crash. --- wayland_backend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wayland_backend.cpp b/wayland_backend.cpp index 859d8c4eea..c2686e9f8d 100644 --- a/wayland_backend.cpp +++ b/wayland_backend.cpp @@ -596,7 +596,7 @@ void WaylandSeat::installCursorImage(Qt::CursorShape shape) loadTheme(); } wl_cursor *c = wl_cursor_theme_get_cursor(m_theme, Cursor::self()->cursorName(shape).constData()); - if (c->image_count <= 0) { + if (!c || c->image_count <= 0) { return; } wl_cursor_image *image = c->images[0];