diff --git a/pointer_input.cpp b/pointer_input.cpp index edc81f8d39..2d3a29b6a7 100644 --- a/pointer_input.cpp +++ b/pointer_input.cpp @@ -1306,9 +1306,10 @@ void WaylandCursorImage::loadThemeCursor(const T &shape, QHash &cursor auto it = cursors.constFind(shape); if (it == cursors.constEnd()) { loadThemeCursor(shape, image); - it = cursors.insert(shape, *image); + cursors.insert(shape, *image); + } else { + *image = it.value(); } - *image = it.value(); } void CursorImage::reevaluteSource()