Brush changes to eraser as if by magic.

I will be happily painting away when for no apparent reason whatever brush I'm using will decide it wants to be a eraser, I have to choose another brush then switch back to my original brush before it works as it should. Anyone know why and if it's fixable?