]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
updateBorders method fixed(). Protection from null GLViewer_Rect is provided CTH_V1_5_3
authorsln <sln@opencascade.com>
Thu, 11 Feb 2010 11:55:43 +0000 (11:55 +0000)
committersln <sln@opencascade.com>
Thu, 11 Feb 2010 11:55:43 +0000 (11:55 +0000)
src/GLViewer/GLViewer_Viewer2d.cxx

index d9b2bbec354ad881bca1a0561899c52e07c1a5a5..2fb24d28b723b5b698b32289234f9a123b06bb05 100644 (file)
@@ -144,6 +144,9 @@ void GLViewer_Viewer2d::updateColors( QColor colorH, QColor colorS )
 */
 void GLViewer_Viewer2d::updateBorders( GLViewer_Rect* theRect )
 {
+  if ( theRect->isNull() )
+    return;
+
   QVector<SUIT_ViewWindow*> views = getViewManager()->getViews();
   for ( int i = 0, n = views.count(); i < n; i++ )
   {
@@ -178,7 +181,7 @@ void GLViewer_Viewer2d::updateBorders()
         {
             GLViewer_Object* anObject = *it;
             GLViewer_Rect* aRect = anObject->getRect();
-            if( !anObject->isScalable() || !anObject->getVisible() )
+            if( !anObject->isScalable() || !anObject->getVisible() || aRect->isNull() )
                 continue;
 
             if( border->isEmpty() )