Shu'bah (may Allah have mercy on him) said: I asked al-Hakam and Hammad about a divorce given in the state of shirk, and they said: It is valid.