Fix missing index validity check for cursortheme

BUG: 454829
(cherry picked from commit bb67809438)
wilder-5.25
Alexander Lohnau 4 years ago
parent 3e652b308f
commit f219748f5d
  1. 2
      kcms/cursortheme/kcmcursortheme.cpp

@ -286,7 +286,7 @@ int CursorThemeConfig::cursorThemeIndex(const QString &cursorTheme) const
QString CursorThemeConfig::cursorThemeFromIndex(int index) const
{
QModelIndex idx = m_themeProxyModel->index(index, 0);
return m_themeProxyModel->theme(idx)->name();
return idx.isValid() ? m_themeProxyModel->theme(idx)->name() : QString();
}
void CursorThemeConfig::save()

Loading…
Cancel
Save