Salome HOME
Merge branch 'agy/arch2_ic0'
[modules/smesh.git] / src / SMESH_SWIG / smeshBuilder.py
index 7bdc59eb4b2d63676e953e9f17e9e98f576072b7..3372442a92c2d6493049601c8dc3d8ed39119785 100644 (file)
@@ -1962,9 +1962,10 @@ class Mesh(metaclass = MeshMeta):
                 print(msg)
                 print(allReasons)
             pass
-        if salome.sg.hasDesktop():
-            if not isinstance( refresh, list): # not a call from subMesh.Compute()
-                if refresh: salome.sg.updateObjBrowser()
+        if salome.sg:
+            if salome.sg.hasDesktop():
+                if not isinstance( refresh, list): # not a call from subMesh.Compute()
+                    if refresh: salome.sg.updateObjBrowser()
 
         return ok