Commit 17145d98 authored by Haocheng LIU's avatar Haocheng LIU Committed by Kitware Robot

Merge topic 'smtkExoCrashing'

965e3256 Fix crash loading a .smtk file when native model is missing
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: David Thompson's avatarDavid Thompson <david.thompson@kitware.com>
Merge-request: !354
parents 1f74d979 965e3256
......@@ -228,6 +228,13 @@ smtk::model::OperatorResult ReadOperator::readExodus()
vtkMultiBlockDataSet* elemBlocks =
vtkMultiBlockDataSet::SafeDownCast(
modelOut->GetBlock(0));
if (!elemBlocks)
{
smtkErrorMacro(this->log(), "Error:Associated file " << filename << " is not valid!");
return this->createResult(OPERATION_FAILED);
}
MarkExodusMeshWithChildren(
elemBlocks, dim,
modelOut->GetMetaData(0u)->Get(vtkCompositeDataSet::NAME()),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment