From 8417376581d456ba48c235666927a268d4f7d795 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Tue, 9 Jan 2007 14:14:58 +0000 Subject: [PATCH] * Check s_windows.size before calling clear --- dbPort/src/org/compiere/util/Env.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dbPort/src/org/compiere/util/Env.java b/dbPort/src/org/compiere/util/Env.java index 91151ba838..e429948061 100644 --- a/dbPort/src/org/compiere/util/Env.java +++ b/dbPort/src/org/compiere/util/Env.java @@ -98,12 +98,14 @@ public final class Env } **/ //bug [ 1574630 ] - if (!finalCall) { - Container c = s_windows.get(0); - s_windows.clear(); - createWindowNo(c); - } else { - s_windows.clear(); + if (s_windows.size() > 0) { + if (!finalCall) { + Container c = s_windows.get(0); + s_windows.clear(); + createWindowNo(c); + } else { + s_windows.clear(); + } } // Clear all Context