mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-01 04:10:34 +05:00
Small fixed. Add check for unregister object.
This commit is contained in:
parent
4342afbfe2
commit
3acd170447
@ -1093,8 +1093,8 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(GEOM::GEOM_Object_ptr theObject,
|
|||||||
if (aList[0]->GetMarkerType() == GEOM::MT_USER)
|
if (aList[0]->GetMarkerType() == GEOM::MT_USER)
|
||||||
theObject->SetMarkerTexture(aList[0]->GetMarkerTexture());
|
theObject->SetMarkerTexture(aList[0]->GetMarkerTexture());
|
||||||
}
|
}
|
||||||
|
if (!CORBA::is_nil(anArgSO))
|
||||||
anArgSO->UnRegister();
|
anArgSO->UnRegister();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Get interface, containing method, which we will use to reconstruct sub-shapes
|
// Get interface, containing method, which we will use to reconstruct sub-shapes
|
||||||
@ -1322,7 +1322,8 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapes(GEOM::GEOM_Object_ptr theObject,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // try to build from published parts
|
} // try to build from published parts
|
||||||
anArgSO->UnRegister();
|
if (!CORBA::is_nil(anArgSO))
|
||||||
|
anArgSO->UnRegister();
|
||||||
}
|
}
|
||||||
} // process arguments
|
} // process arguments
|
||||||
}
|
}
|
||||||
|
@ -924,7 +924,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
"""
|
"""
|
||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
try:
|
try:
|
||||||
aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
|
aSObject = self.AddInStudy(aShape, aName, aFather)
|
||||||
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
|
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
|
||||||
except:
|
except:
|
||||||
print "addToStudyInFather() failed"
|
print "addToStudyInFather() failed"
|
||||||
|
Loading…
Reference in New Issue
Block a user