Author: sebb
Date: Wed Jan  7 10:44:20 2009
New Revision: 732427

URL: http://svn.apache.org/viewvc?rev=732427&view=rev
Log:
Protect against possible NPE if called during shutdown

Modified:
    
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/RegexFunction.java

Modified: 
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/RegexFunction.java
URL: 
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/RegexFunction.java?rev=732427&r1=732426&r2=732427&view=diff
==============================================================================
--- 
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/RegexFunction.java
 (original)
+++ 
jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/RegexFunction.java
 Wed Jan  7 10:44:20 2009
@@ -127,6 +127,10 @@
         // Relatively expensive operation, so do it once
         JMeterVariables vars = getVariables();
 
+        if (vars == null){// Can happen if called during test closedown
+            return defaultValue;
+        }
+
         if (name.length() > 0) {
             vars.put(name, defaultValue);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org

Reply via email to