fix commit 169a3d88, restoring the parameter is good, asserting it not
This commit is contained in:
parent
8c668e6126
commit
ed216df8e3
1 changed files with 8 additions and 3 deletions
|
@ -388,9 +388,9 @@ static NET::WindowType comboToType(int val)
|
|||
|
||||
void RulesWidget::setRules(Rules* rules)
|
||||
{
|
||||
Rules tmp;
|
||||
|
||||
Q_ASSERT( rules );
|
||||
const bool readFromNewEmptyRules = !rules;
|
||||
if (readFromNewEmptyRules)
|
||||
rules = new Rules;
|
||||
|
||||
description->setText(rules->description);
|
||||
wmclass->setText(rules->wmclass);
|
||||
|
@ -451,6 +451,11 @@ void RulesWidget::setRules(Rules* rules)
|
|||
CHECKBOX_FORCE_RULE(strictgeometry,);
|
||||
CHECKBOX_FORCE_RULE(disableglobalshortcuts,);
|
||||
CHECKBOX_FORCE_RULE(blockcompositing,);
|
||||
|
||||
if (readFromNewEmptyRules) {
|
||||
delete rules;
|
||||
rules = NULL; // it's the function parameter...
|
||||
}
|
||||
}
|
||||
|
||||
#undef GENERIC_RULE
|
||||
|
|
Loading…
Reference in a new issue