vtkStringArray* names =
vtkStringArray::SafeDownCast(tree->GetVertexData()->GetAbstractArray("Names"));
+ if(!names)// In case of error right at the begining of loading process (empty MED file)
+ return ;
+
vtkIdType root = tree->GetRoot();
vtkIdType fst = tree->GetChild(root, 0); // FieldsStatusTree
this->addPropertyLink(this, "timeSteps", SIGNAL(timeStepsChanged()),
smproxy, smproperty);
+ if(!this->TimesVectWidget) // In case of error right at the begining of loading process (empty MED file)
+ return ;
+
const QMap<QString, VectBoolItem*>& items(this->TimesVectWidget->getItems());
QMap<QString, VectBoolItem*>::const_iterator it;
for (it = items.begin(); it != items.end(); it++)
// Put together a TimeStep list, using ItemMap
QList< QList< QVariant> > ret;
QList< QVariant > timeStep;
+ if(!this->TimesVectWidget) // In case of error right at the begining of loading process (empty MED file)
+ return ret;
const QMap<QString, VectBoolItem*>& items(this->TimesVectWidget->getItems());
QMap<QString, VectBoolItem*>::const_iterator it;
for (it = items.begin(); it != items.end(); it++)
delete this->TimesVectWidget;
}
+ if(!graph)
+ return ;// In case of error right at the begining of loading process (empty MED file)
+
// (Re)cretate widget
this->TimesVectWidget = new VectBoolWidget(this,
pqMedReaderGraphUtils::getMaxNumberOfTS(graph));