Tests: add unit tests for:
* TopoShape::getElementTypeAndIndex * ComplexGeoData::getTypeAndIndex and fix crashes there when passing a null pointer
This commit is contained in:
@@ -64,7 +64,7 @@ std::pair<std::string, unsigned long> ComplexGeoData::getTypeAndIndex(const char
|
||||
boost::regex ex("^([^0-9]*)([0-9]*)$");
|
||||
boost::cmatch what;
|
||||
|
||||
if (boost::regex_match(Name, what, ex)) {
|
||||
if (Name && boost::regex_match(Name, what, ex)) {
|
||||
element = what[1].str();
|
||||
index = std::atoi(what[2].str().c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user