Commit e255ccfa authored by Tobias Fella's avatar Tobias Fella

kcm/componentchooser: fix crash when no applications installed

BUG: 431651
parent eca7f0b7
......@@ -99,7 +99,7 @@ void ComponentChooser::load()
void ComponentChooser::select(int index)
{
if (m_index == index) {
if (m_index == index && m_applications.size() != 1) {
return;
}
if (index == m_applications.length() - 1) {
......
......@@ -58,7 +58,7 @@ Q_SIGNALS:
protected:
QVariantList m_applications;
int m_index;
int m_index = -1;
std::optional<int> m_defaultIndex;
QString m_mimeType;
QString m_type;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment