- fixed endless loop in prepareVBO due to badly incremented iterator

Sun, 07 Sep 2014 20:51:14 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 07 Sep 2014 20:51:14 +0300
changeset 886
3c83fe3486b1
parent 884
d820588bf4f1
child 887
98fe1587dc43

- fixed endless loop in prepareVBO due to badly incremented iterator

src/glCompiler.cc file | annotate | diff | comparison | revisions
--- a/src/glCompiler.cc	Sun Sep 07 04:15:54 2014 +0300
+++ b/src/glCompiler.cc	Sun Sep 07 20:51:14 2014 +0300
@@ -285,13 +285,16 @@
 		if (it.key() == null)
 		{
 			it = m_objectInfo.erase (it);
+			continue;
 		}
-		elif (it.key().toStrongRef()->document() == CurrentDocument()
+
+		if (it.key().toStrongRef()->document() == CurrentDocument()
 			and not it.key().toStrongRef()->isHidden())
 		{
 			vbodata += it->data[vbonum];
-			++it;
 		}
+
+		++it;
 	}
 
 	glBindBuffer (GL_ARRAY_BUFFER, m_vbo[vbonum]);

mercurial