Index: trunk/src/gl/gl_context.cc
===================================================================
--- trunk/src/gl/gl_context.cc	(revision 107)
+++ trunk/src/gl/gl_context.cc	(revision 108)
@@ -351,4 +351,6 @@
 gl_context::gl_context()
 {
+	// TODO: do we really need this?
+	glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
 	force_apply_render_state( m_render_state );
 }
@@ -357,8 +359,11 @@
 {
 	apply_render_state( rs );
-	p->bind();
-	va->bind();
-	glDrawArrays( primitive_to_enum(prim), 0, count);
-	va->unbind();
-	p->unbind();
-}
+	if ( count > 0 )
+	{
+		p->bind();
+		va->bind();
+		glDrawArrays( primitive_to_enum(prim), 0, count);
+		va->unbind();
+		p->unbind();
+	}
+}
