An agreement not to transfer the claim of the insured against the insurer after a loss has happened, is void if made before the loss except as otherwise provided in Article 2 of Chapter 1 of Part 2 of Division 2 of this code.

(Amended by Stats. 1947, Ch. 904.)