Oops, handle case when nothing was modified.
svn path=/trunk/kdebase/kwin/; revision=336018
This commit is contained in:
parent
4c7fcb58a7
commit
c12fe50943
1 changed files with 2 additions and 2 deletions
|
@ -142,7 +142,7 @@ static int edit( Window wid )
|
|||
loadRules( rules );
|
||||
Rules* orig_rule = findRule( rules, wid );
|
||||
RulesDialog dlg;
|
||||
// dlg.edit() creates new Rules instance
|
||||
// dlg.edit() creates new Rules instance if edited
|
||||
Rules* edited_rule = dlg.edit( orig_rule, wid );
|
||||
if( edited_rule == NULL ) // cancelled
|
||||
return 0;
|
||||
|
@ -160,7 +160,7 @@ static int edit( Window wid )
|
|||
delete edited_rule;
|
||||
}
|
||||
}
|
||||
else // not empty
|
||||
else if( edited_rule != orig_rule )
|
||||
{
|
||||
QValueList< Rules* >::Iterator pos = rules.find( orig_rule );
|
||||
if( pos != rules.end())
|
||||
|
|
Loading…
Reference in a new issue