1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

should only add multirule if there are rules. If we do add a multirule with no rules, then we hit an exception

This commit is contained in:
David McKnight 2007-04-25 14:14:53 +00:00
parent 5117d0c6d4
commit bb8214b649

View file

@ -131,9 +131,12 @@ public class SystemPasteFromClipboardAction extends SystemBaseAction implements
rulesList.add(targetSubSystem);
}
*/
ISchedulingRule[] rules = (ISchedulingRule[])rulesList.toArray(new ISchedulingRule[rulesList.size()]);
MultiRule rule = new MultiRule(rules);
runnable.setRule(rule);
if (rulesList.size() > 0)
{
ISchedulingRule[] rules = (ISchedulingRule[])rulesList.toArray(new ISchedulingRule[rulesList.size()]);
MultiRule rule = new MultiRule(rules);
runnable.setRule(rule);
}
}
}
runnable.schedule();