diff --git a/kcms/cursortheme/kcmcursortheme.cpp b/kcms/cursortheme/kcmcursortheme.cpp index 69f511b9c..6f7f4c170 100644 --- a/kcms/cursortheme/kcmcursortheme.cpp +++ b/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()