From: sbh Date: Thu, 23 Apr 2015 11:04:22 +0000 (+0300) Subject: Fix for crash on clearing of the parameter name field X-Git-Tag: V_1.2.0~110^2~3^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0f1b12688ddc7f29c6325d0236c4123316bfb2ff;p=modules%2Fshaper.git Fix for crash on clearing of the parameter name field --- 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;