Don't crash when framebuffer is a nullptr.