]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Minor change
authorouv <ouv@opencascade.com>
Thu, 12 Mar 2009 12:28:25 +0000 (12:28 +0000)
committerouv <ouv@opencascade.com>
Thu, 12 Mar 2009 12:28:25 +0000 (12:28 +0000)
src/GLViewer/GLViewer_Viewer2d.cxx

index 712bebbbfdc5286c24488cf664562cc79c9b12d0..d9b2bbec354ad881bca1a0561899c52e07c1a5a5 100644 (file)
@@ -231,7 +231,8 @@ void GLViewer_Viewer2d::activateDrawers( QList<GLViewer_Object*>& theObjects, bo
     QList<GLViewer_Drawer*>::Iterator anIt = myDrawers.begin();
     QList<GLViewer_Drawer*>::Iterator endDIt = myDrawers.end();
     for( ; anIt != endDIt; anIt++ )
-        (*anIt)->clear();
+        if( *anIt )
+            (*anIt)->clear();
 
     QList<GLViewer_Drawer*> anActiveDrawers;
     QList<GLViewer_Object*>::Iterator endOIt = theObjects.end();
@@ -245,7 +246,7 @@ void GLViewer_Viewer2d::activateDrawers( QList<GLViewer_Object*>& theObjects, bo
             endDIt = myDrawers.end();
 
             for( ; anIt != endDIt; anIt++ )
-                if( (*anIt)->getObjectType() == (*oit)->getObjectType() )
+                if( *anIt && (*anIt)->getObjectType() == (*oit)->getObjectType() )
                 {
                     (*oit)->setDrawer( *anIt );
                     aDrawer = *anIt;