From: markt Date: Mon, 17 Aug 2009 21:40:41 +0000 (+0000) Subject: Fix NPE if something tries to access resources accessed during a stop. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=eae45a42e62da72ec94e40c2409597ada24e8721;p=tomcat7.0 Fix NPE if something tries to access resources accessed during a stop. This was seen when unpackWARs="false" and the JDBC clean up code tried to load the leak prevention class during a context stop. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@805153 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/naming/resources/WARDirContext.java b/java/org/apache/naming/resources/WARDirContext.java index 5eaa36beb..9a4293feb 100644 --- a/java/org/apache/naming/resources/WARDirContext.java +++ b/java/org/apache/naming/resources/WARDirContext.java @@ -797,7 +797,7 @@ public class WARDirContext extends BaseDirContext { * Entry tree lookup. */ protected Entry treeLookup(Name name) { - if (name.isEmpty()) + if (name.isEmpty() || entries == null) return entries; Entry currentEntry = entries; for (int i = 0; i < name.size(); i++) {