Fixed a bug in Texture::SetImage

Texture::SetImage with a nullptr for the initial texture data would cause
an invalid memory access