]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Avoid using of empty list.
authorakl <alexander.kovalev@opencascade.com>
Tue, 23 Sep 2014 11:22:10 +0000 (15:22 +0400)
committerakl <alexander.kovalev@opencascade.com>
Tue, 23 Sep 2014 11:22:10 +0000 (15:22 +0400)
src/PyConsole/PyConsole_Editor.cxx

index c9542464aa7ec3ab7d24d1785fc7e9233ab7e353..05eaa6ba03688aa0767fa49d6c9e3fbfb8151f0c 100644 (file)
@@ -943,7 +943,8 @@ void PyConsole_Editor::customEvent( QEvent* event )
     {
       PrintEvent* pe=(PrintEvent*)event;
       addText( pe->text(), false, pe->isError());
-      myHistory.last().output = myHistory.last().output + pe->text();
+      if ( myHistory.count() > 0 )
+        myHistory.last().output = myHistory.last().output + pe->text();
       return;
     }
   case PyInterp_Event::ES_OK: