Merge branch 'bug51910' into trunk
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 1 Oct 2011 13:42:16 +0000 (13:42 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 1 Oct 2011 13:42:16 +0000 (13:42 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1177978 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardWrapperValve.java

index 74e0a4d..9e27fcb 100644 (file)
@@ -349,7 +349,13 @@ final class StandardWrapperValve
         // This should be a Request attribute...
         long t1=System.currentTimeMillis();
         // FIXME: Add a flag to count the total amount of events processed ? requestCount++;
+        
         StandardWrapper wrapper = (StandardWrapper) getContainer();
+        if (wrapper == null) {
+            // Context has been shutdown. Nothing to do here.
+            return;
+        }
+
         Servlet servlet = null;
         Context context = (Context) wrapper.getParent();