Avoid crashing when texture allocation fails
A couple of fixes to avoid crashing when texture allocation fails, in the unusual case where the desired FBO size is greater than GL_MAX_TEXTURE_SIZE
.
Bug reports and fixes by Gert van de Kraats.
https://launchpad.net/bugs/1790525
https://launchpad.net/bugs/1795774