diff --git a/build_num b/build_num index 7db77f893..c3dfc45ac 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 366 +#define BUILD_NUM 368 diff --git a/doc/ChangeLog b/doc/ChangeLog index 63a4e53ff..1692a960c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,9 @@ +2008-07-16 vadim + + * RuleSetView.cpp (RuleSetView::addToGroupAbove): Additional check + for a bug where adding very long list of rules to a rule group + caused crash once. Bug is hard to reproduce. + 2008-07-15 vadim * testing and bug fixes with QT 4.4. diff --git a/src/gui/RuleSetView.cpp b/src/gui/RuleSetView.cpp index e029306d8..7a719b323 100644 --- a/src/gui/RuleSetView.cpp +++ b/src/gui/RuleSetView.cpp @@ -2524,20 +2524,26 @@ void RuleSetView::addToGroupAbove () RuleRowInfo *ru = rowsInfo[top]; if (fwbdebug) - qDebug("RuleSetView::addToGroupAbove row=%d", row); + qDebug("RuleSetView::addToGroupAbove row=%d count=%d", row, count); if (!ru->isBeginRow) { top = getUpNullRuleIndex(top-1); ru = rowsInfo[top]; } + for (int i = 0; i< count ; i++) { Rule *r = Rule::cast(ruleIndex[row+i]); - r->setRuleGroupName (ru->groupName.toAscii().data()); - //ruleIndex[row+i] =r ; - if (ru->collapsedGroup) showHideRuleGroup( - dynamic_cast(indexWidget(model()->index(top,1)))); + if (r) + { + r->setRuleGroupName (ru->groupName.toAscii().data()); + //ruleIndex[row+i] =r ; + if (ru->collapsedGroup) + showHideRuleGroup( + dynamic_cast( + indexWidget(model()->index(top,1)))); + } } updateGroups(); } @@ -2555,10 +2561,15 @@ void RuleSetView::addToGroupBelow() for (int i = 0; i< count ; i++) { Rule *r = Rule::cast(ruleIndex[row+i]); - r->setRuleGroupName (ru->groupName.toAscii().data()); - //ruleIndex[row+i] =r ; - if (ru->collapsedGroup) showHideRuleGroup( - dynamic_cast(indexWidget(model()->index(bottom,1)))); + if (r) + { + r->setRuleGroupName (ru->groupName.toAscii().data()); + //ruleIndex[row+i] =r ; + if (ru->collapsedGroup) + showHideRuleGroup( + dynamic_cast( + indexWidget(model()->index(bottom,1)))); + } } updateGroups(); }