]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
getStudy() method. Verification of root object on NULL added
authorsln <sln@opencascade.com>
Thu, 23 Sep 2010 08:54:02 +0000 (08:54 +0000)
committersln <sln@opencascade.com>
Thu, 23 Sep 2010 08:54:02 +0000 (08:54 +0000)
src/LightApp/LightApp_DataModel.cxx

index 5074d475fc054a8495ee7a40217ddfadef506dac..cccf466c94117a2734c0a567137f69428433a255 100644 (file)
@@ -152,6 +152,8 @@ LightApp_Module* LightApp_DataModel::getModule() const
 */
 LightApp_Study* LightApp_DataModel::getStudy() const
 {
+  if ( !root() )
+    return 0;
   LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root()->root() );
   if ( !aRoot )
     return 0;