Fixing memory leak.
Make sure the FBO is initialized before selecting the shader program.