The phase diagram of a magnetic superconductor