<Minor> Added OpenGL error checking in Window