if (aList[0]->GetMarkerType() == GEOM::MT_USER)
theObject->SetMarkerTexture(aList[0]->GetMarkerTexture());
}
-
- anArgSO->UnRegister();
+ if (!CORBA::is_nil(anArgSO))
+ anArgSO->UnRegister();
}
else {
// Get interface, containing method, which we will use to reconstruct sub-shapes
}
}
} // try to build from published parts
- anArgSO->UnRegister();
+ if (!CORBA::is_nil(anArgSO))
+ anArgSO->UnRegister();
}
} // process arguments
}
"""
# Example: see GEOM_TestAll.py
try:
- aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
+ aSObject = self.AddInStudy(aShape, aName, aFather)
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
except:
print "addToStudyInFather() failed"