Fixed a class initializer crash on shutdown when the graph has nothing to run.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4860 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
kshakir 2010-12-16 18:56:55 +00:00
parent 8101f8f301
commit 3a6d1dbcef
1 changed files with 3 additions and 2 deletions

View File

@ -759,7 +759,8 @@ class QGraph extends Logging {
*/
def shutdown() {
shuttingDown = true
if (commandLineManager != null)
commandLineManager.tryStop(getRunningJobs.map(_.runner))
val runningJobs = getRunningJobs
if (commandLineManager != null && !runningJobs.isEmpty)
commandLineManager.tryStop(runningJobs.map(_.runner))
}
}