Author: sebb Date: Thu Aug 14 14:52:48 2008 New Revision: 686055 URL: http://svn.apache.org/viewvc?rev=686055&view=rev Log: Avoid possible NPE (if property used on Test Plan)
Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Property.java Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Property.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Property.java?rev=686055&r1=686054&r2=686055&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Property.java (original) +++ jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/Property.java Thu Aug 14 14:52:48 2008 @@ -26,6 +26,7 @@ import org.apache.jmeter.engine.util.CompoundVariable; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.samplers.Sampler; +import org.apache.jmeter.threads.JMeterVariables; import org.apache.jmeter.util.JMeterUtils; /** @@ -80,7 +81,10 @@ if (values.length > 1) { String variableName = ((CompoundVariable) values[1]).execute(); if (variableName.length() > 0) {// Allow for empty name - getVariables().put(variableName, propertyValue); + final JMeterVariables variables = getVariables(); + if (variables != null) { + variables.put(variableName, propertyValue); + } } } return propertyValue; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]