Validate framebuffer uploads a bit more

Fixes a crash @solarmystic reported, might maybe help #6377?

-[Unknown]