Added check to GetTexture