/*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Copyright (c) 2010, 2014 Association for Decentralized Information Management in\r
* Industry THTH ry.\r
* All rights reserved. This program and the accompanying materials\r
* are made available under the terms of the Eclipse Public License v1.0\r
SysdynExperimentManagerListener.listenManager(manager);\r
IExperiment[] experiments = manager.getExperiments();\r
SubMonitor shutdownMon = mon.newChild(10000);\r
- int workPerExperiment = 10000 / experiments.length;\r
+ int workPerExperiment;\r
+ if (experiments.length > 0)\r
+ workPerExperiment = 10000 / experiments.length;\r
+ else\r
+ workPerExperiment = 10000;\r
for(IExperiment e : experiments)\r
if(e.getState() != ExperimentState.DISPOSED)\r
e.shutdown(shutdownMon.newChild(workPerExperiment));\r