[edited since posting, in light of comment below]
When a non-client sues a lawyer on certain sorts of claims and the lawyer's defense would require disclosure of privileged information, California law will sustain a lawyer's demurrer to the complaint. McDermott, Will & Emery v. Superior Court (2000) 83 Cal.App.4th 378; see also, Solin v. O'Melveny & Myers (2001) 89 Cal.App.4th 451 (claim by plaintiff-lawyer against law firm he consulted with on behalf of plaintiff's underlying client was barred where it would necessarily depend upon privileged information of the underlying client).
But what about when there are two joint clients, one is suing the lawyer, and the second client doesn't consent to revelation of the privileged information arising out of the joint representation? The new case, Anten v. Superior Court, deals with a discovery ruling, but it establishes the viability of such claims. An excerpt from early in new opinion: