[kwin_wayland] Safety check for WaylandSeat::installCursorImage
wl_cursor_theme_get_cursor might return a null pointer - return instead of crash.
This commit is contained in:
parent
d880f7418c
commit
ac25052c22
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue