From 6847840a3bc4b4df9bfdceea0f5ed80c9e109b91 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Wed, 16 Sep 2015 15:18:27 +0200 Subject: typo and debug --- src/OpenTKGameWindow.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/OpenTKGameWindow.cs') diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index bc1ebda9..ff1ffeed 100755 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -92,11 +92,13 @@ namespace go /// Remove all Graphic objects from top container public void ClearInterface() { - foreach (GraphicObject g in GraphicObjects) { + int i = 0; + while (GraphicObjects.Count>0) { + GraphicObject g = GraphicObjects [i]; g.Visible = false; g.ClearBinding (); + GraphicObjects.RemoveAt (0); } - GraphicObjects.Clear (); } public void Quit () { -- cgit v1.3.1-4-g156e