diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index 65fc681794..3de3ac5aad 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -441,7 +441,7 @@ void RulesWidget::setRules( Rules* rules ) #undef COMBOBOX_FORCE_RULE #define GENERIC_RULE( var, func, Type, type, uimethod ) \ - if( enable_##var->isChecked()) \ + if( enable_##var->isChecked() && rule_##var->currentIndex() >= 0) \ { \ rules->var##rule = combo_to_##type##_rule[ rule_##var->currentIndex() ]; \ rules->var = func( Ui_RulesWidgetBase::var->uimethod()); \