Skip to content

Commit 38ca41b

Browse files
committed
Fixed potential crash in GetAllocatorIDsRecursive.
1 parent 884c34a commit 38ca41b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FEMLib/FSModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2724,7 +2724,7 @@ int FSModel::RemoveMeshDataGenerator(FSMeshDataGenerator* pmd)
27242724

27252725
void GetAllocatorIDsRecursive(FSCoreBase* obj, std::unordered_set<int>& allocatorIDs)
27262726
{
2727-
if (obj == nullptr) return;
2727+
if ((obj == nullptr) || (obj->GetClassID() == -1)) return;
27282728

27292729
FEBio::FEBioClassInfo ci = FEBio::GetClassInfo(obj->GetClassID());
27302730
allocatorIDs.insert(ci.allocId);

0 commit comments

Comments
 (0)