From: eap Date: Wed, 10 May 2006 12:54:55 +0000 (+0000) Subject: fix bug 12361. In SetName(): there may be no study X-Git-Tag: T3_2_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=d9a6e9d9f3e844703bbeb5cd6806bed6c2e9b615;ds=sidebyside fix bug 12361. In SetName(): there may be no study --- diff --git a/src/SMESH_SWIG/smesh.py b/src/SMESH_SWIG/smesh.py index bf7fed011..6b95891c7 100644 --- a/src/SMESH_SWIG/smesh.py +++ b/src/SMESH_SWIG/smesh.py @@ -60,8 +60,9 @@ def GetName(obj): def SetName(obj, name): ior = salome.orb.object_to_string(obj) sobj = salome.myStudy.FindObjectIOR(ior) - attr = sobj.FindAttribute("AttributeName")[1] - attr.SetValue(name) + if not sobj is None: + attr = sobj.FindAttribute("AttributeName")[1] + attr.SetValue(name) # Algorithms and hypothesis # =========================