From 0f1b12688ddc7f29c6325d0236c4123316bfb2ff Mon Sep 17 00:00:00 2001 From: sbh Date: Thu, 23 Apr 2015 14:04:22 +0300 Subject: [PATCH] Fix for crash on clearing of the parameter name field --- src/ParametersPlugin/ParametersPlugin_Validators.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ParametersPlugin/ParametersPlugin_Validators.cpp b/src/ParametersPlugin/ParametersPlugin_Validators.cpp index 788e16398..d15102d64 100644 --- a/src/ParametersPlugin/ParametersPlugin_Validators.cpp +++ b/src/ParametersPlugin/ParametersPlugin_Validators.cpp @@ -29,6 +29,8 @@ bool ParametersPlugin_VariableValidator::isValid(const AttributePtr& theAttribut bool ParametersPlugin_VariableValidator::isVariable(const std::string& theString) const { + if (theString.empty()) + return false; std::string::const_iterator it = theString.begin(); if (!(isalpha(*it) || (*it) == '_') || it == theString.end()) return false; -- 2.39.2