Commit 8f31cb2b authored by John Biddiscombe's avatar John Biddiscombe
Browse files

BUG: fix a small logis error when returing status from insert

parent bb300138
......@@ -122,7 +122,7 @@ XdmfGrid::Insert( XdmfElement *Child){
XDMF_WORD_CMP(Child->GetElementName(), "Information")
)){
XdmfInt32 status = XdmfElement::Insert(Child);
if((status = XDMF_SUCCESS) && XDMF_WORD_CMP(Child->GetElementName(), "Grid")){
if((status == XDMF_SUCCESS) && XDMF_WORD_CMP(Child->GetElementName(), "Grid")){
XdmfGrid *ChildGrid = (XdmfGrid *)Child;
XdmfInt32 nchild = this->NumberOfChildren + 1;
this->Children = (XdmfGrid **)realloc(this->Children, nchild * sizeof(XdmfGrid *));
......@@ -134,6 +134,7 @@ XdmfGrid::Insert( XdmfElement *Child){
}
return(XDMF_SUCCESS);
}
if (status == XDMF_SUCCESS) return(XDMF_SUCCESS);
}else{
XdmfErrorMessage("Grid can only Insert Grid | Geometry | Topology | Attribute | Region | DataItem | Information elements, not a " << Child->GetElementName());
}
......
Supports Markdown
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