Salome HOME
Update Help for VISU module.
[modules/visu.git] / src / VISU_I / VISU_Gen_i.hh
index abaac0a6e46e0d1dc3a7f46fd8e3d022e4211a6e..240b6beacb6be67d682c8fe464156e8515defccf 100644 (file)
@@ -69,8 +69,10 @@ namespace VISU{
       if(Result_i* pResult = dynamic_cast<Result_i*>(GetServant(theResult).in())){
        if(TPrs3d_i::IsPossible(pResult,theMeshName,theEntity,theFieldName,int(theIteration))){
          aPresent = new TPrs3d_i(pResult,theAddToStudy);
-         if(aPresent->Create(theMeshName,theEntity,theFieldName,int(theIteration)) == NULL)
+         if(aPresent->Create(theMeshName,theEntity,theFieldName,int(theIteration)) == NULL){
            aPresent->_remove_ref();
+           aPresent = NULL;
+         }
        }
       }
       return aPresent;