From ccc57df398fd1c22ee51bbdcedb79e3e682e7eed Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Thu, 7 Oct 2010 10:20:24 +0400 Subject: [PATCH] fix NSEE --- .../intellij/openapi/util/ShutDownTracker.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/platform/util/src/com/intellij/openapi/util/ShutDownTracker.java b/platform/util/src/com/intellij/openapi/util/ShutDownTracker.java index 33df1651babe..35cacacd5065 100644 --- a/platform/util/src/com/intellij/openapi/util/ShutDownTracker.java +++ b/platform/util/src/com/intellij/openapi/util/ShutDownTracker.java @@ -77,14 +77,15 @@ public class ShutDownTracker implements Runnable { LOG.error(e); } } - - - for (Thread thread = myShutdownThreads.removeLast(); thread != null; thread = myShutdownThreads.removeLast()) { - thread.start(); - try { - thread.join(); - } - catch (InterruptedException ignored) { + + if (!myShutdownThreads.isEmpty()) { + for (Thread thread = myShutdownThreads.removeLast(); thread != null; thread = myShutdownThreads.removeLast()) { + thread.start(); + try { + thread.join(); + } + catch (InterruptedException ignored) { + } } } }