From a4eccf0397f36e14ca39850e0fcafe9990695b01 Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 12 Mar 2009 12:28:25 +0000 Subject: [PATCH] Minor change --- src/GLViewer/GLViewer_Viewer2d.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GLViewer/GLViewer_Viewer2d.cxx b/src/GLViewer/GLViewer_Viewer2d.cxx index 712bebbbf..d9b2bbec3 100644 --- a/src/GLViewer/GLViewer_Viewer2d.cxx +++ b/src/GLViewer/GLViewer_Viewer2d.cxx @@ -231,7 +231,8 @@ void GLViewer_Viewer2d::activateDrawers( QList& theObjects, bo QList::Iterator anIt = myDrawers.begin(); QList::Iterator endDIt = myDrawers.end(); for( ; anIt != endDIt; anIt++ ) - (*anIt)->clear(); + if( *anIt ) + (*anIt)->clear(); QList anActiveDrawers; QList::Iterator endOIt = theObjects.end(); @@ -245,7 +246,7 @@ void GLViewer_Viewer2d::activateDrawers( QList& 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; -- 2.39.2