Salome HOME
Merge from V6_main 01/04/2013
[modules/smesh.git] / src / SMESH_SWIG / smesh_algorithm.py
index 9b3acf00d61b45b9a20cbdbdef80aceb522d8927..eda19fea4db6a753a3c016861de0315078e11799 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -71,6 +71,7 @@ class Mesh_Algorithm:
     #  @return SMESH.SMESH_Hypothesis
     def FindHypothesis (self, hypname, args, CompareMethod, smeshpyD):
         study = smeshpyD.GetCurrentStudy()
+        if not study: return None
         #to do: find component by smeshpyD object, not by its data type
         scomp = study.FindComponent(smeshpyD.ComponentDataType())
         if scomp is not None: