Texture Glitch

Sometimes when I try to paint it changes to black then to the default texture and I can’t edit it.