When immediate mode is used with a temp texture the draw command was executed after the texture was freed. This PR ensures that the draw command is executed before the texture is freed. Pull Request: https://projects.blender.org/blender/blender/pulls/111111