
187 Cal.App.3d 1030 (1986)
232 Cal. Rptr. 320
SOUTHERN CALIFORNIA GAS COMPANY, Petitioner,
v.
THE SUPERIOR COURT OF RIVERSIDE COUNTY, Respondent; GLEN RADER et al., Real Parties in Interest.
Docket No. E002994.
Court of Appeals of California, Fourth District, Division Two.
December 10, 1986.
*1031 COUNSEL
Wilson, Borror, Dunn & Scott and James R. Dunn for Petitioner.
No appearance for Respondent.
Brumer, Rubin & Hiles and Russel D. Hiles for Real Parties in Interest.
*1032 OPINION
KAUFMAN, Acting P.J.
Pursuant to Code of Civil Procedure section 877.6, subdivision (e),[1] defendant Southern California Gas Company (SoCal) seeks a writ of mandate to compel the respondent Riverside Superior Court to vacate an order determining a settlement between the plaintiffs and several other defendants to be a "good faith" settlement within the meaning of section 877.[2] The settlement called for a payment to the plaintiff of $800,000 cash, representing the policy limits of two insurance policies, plus an assignment to plaintiffs of all the settling defendants' rights, both in contract and tort, in respect to a third insurance policy under which the insurer had denied coverage.
SoCal contends the court abused its discretion in determining the settlement was a "good faith" settlement within the meaning of section 877 as interpreted in Tech-Bilt, Inc. v. Woodward-Clyde & Associates (1985) 38 Cal.3d 488 [213 Cal. Rptr. 256, 698 P.2d 159] because (1) the settling defendants' potential share of liability for damages greatly exceeded the amount they offered in settlement and thus the nonsettling defendants are threatened with an inequitable proportion of liability and (2) the inclusion in the settlement package of an assignment to plaintiffs of the settling defendants' rights under the third insurance policy, being an asset of undetermined value and being unallocated between the several plaintiffs and wholly within the power of the plaintiffs to pursue or abandon, deprives the nonsettling defendants of their statutory right to credit for the full value of the settlement upon any eventual judgment against them.

Factual and Procedural Background
SoCal contracted with S & E Pipeline Construction Company (S & E) for the installation of a pipeline in an underground trench at Ripley. S & E in turn contracted with defendants Rader Stinger Crane Service, Glen Rader, S & R Crane Service, and William Sewell (dba Sewell's Crane Service) to furnish a crane to move pipe segments from trailer-trucks to the ground and into their underground position. At the time of the accident giving rise to *1033 this case, the crane, built and designed by defendant Eckman Manufacturing, Inc., was being operated by defendant Benny Lee Sewell, who was apparently employed for that purpose by one or more of the crane subcontractors. Benny Lee Sewell and the various crane subcontractors, who are the real parties in interest in this writ proceeding, will be referred to collectively as the crane defendants or the settling defendants.
On March 17, 1983, decedent Gregory L. Wyche and plaintiff David Kaeding, employees of S & E, were assigned to work on the pipeline project. In the early morning hours of that day, Sewell was operating the crane to remove a pipe segment from the back of a truck. Wyche and Kaeding assisted this effort by holding and steadying the ends of the pipe segment as it was lifted. Suddenly, the crane either moved too close to or came in direct contact with a high voltage power line overhead. Electricity was somehow transferred into the pipe segment Wyche and Kaeding were holding. Wyche was electrocuted and Kaeding was seriously injured.
On February 27, 1984, Teresa Wyche, the widow of the decedent, as administratrix of her husband's estate and as guardian ad litem for her minor daughters Lisa and Brandy Wyche, filed a wrongful death action asserting causes of action for negligence, strict liability and breach of warranty. Named as defendants were the crane defendants, SoCal, Eckman Manufacturing and Herbert Eckman. A week later plaintiff David Kaeding filed a complaint for his damages, also based on counts for negligence, breach of warranty and strict liability. Kaeding's complaint is not part of the record; however, we are informed in the return of the crane defendants that Kaeding's complaint named them as parties defendant.
On May 10, 1984, SoCal filed a cross-complaint for indemnity against the crane defendants and Eckman. We are informed that Eckman and the crane defendants also each filed a separate cross-complaint for indemnity against other named codefendants.[3]
In late November 1985, the crane defendants entered into a settlement agreement with both the Wyche family and David Kaeding. The settlement agreement provided the crane defendants would pay plaintiffs $800,000 cash, comprising the policy limits under two insurance policies: Lexington Insurance Company  $500,000, Great Falls Insurance Company  $300,000 and that in addition, the crane defendants would assign to plaintiffs *1034 all their rights under a $500,000 insurance policy issued by National Fire & Marine Insurance Company (NF&M), in respect to which NF&M had denied coverage and rejected the crane defendants' claim for policy benefits. As the settlement agreement was portrayed to the trial court and is explained in the record, this assignment of rights in respect to the NF&M policy included the right to sue NF&M both for breach of contract and for bad faith denial of coverage and refusal to defend. NF&M has filed a declaratory relief action against the crane defendants, Kaeding and the Wyche family seeking an adjudication of the propriety of its denial of coverage under the policy.
The record indicates that under the settlement the $800,000 cash payment was to be allocated $700,000 to the Wyche family and $100,000 to David Kaeding. The record fails to indicate, however, how any future recovery under or on account of the NF&M policy would be allocated among the plaintiffs.
The crane defendants filed a motion for a judicial determination that their settlement with plaintiffs was in "good faith." The motion was opposed by SoCal and the Eckman defendants. After a hearing, the superior court issued an order on March 7, 1986, finding the settlement to be in good faith, stating: "After due deliberation, and consideration of all the evidence, documents, and pleadings on file, this court grants the motion of the Defendants ... for a judicial determination of a good faith settlement." Further, the order provided that "... if the WYCHE Plaintiffs recover any funds from the declaratory relief action filed by National Fire & Marine Insurance Company, the Defendants herein ... are to receive credit for those sums." Based on the finding of good faith, pursuant to section 877 (see fn. 2, ante) the court ordered the crane defendants discharged from any liability for contribution or indemnity and ordered the complaint and likewise all cross-complaints against the crane defendants dismissed.[4]
Neither the court nor the parties fixed a monetary value for the assigned rights in respect to the NF&M insurance policy but as indicated above the order stated the nonsettling defendants were to receive credit on any judgment against them for any funds recovered "... from the declaratory relief action filed by National Fire & Marine Insurance Company...."

Discussion
(1) Although in its petition SoCal asserted that the amount of the settlement was not a "ballpark" approximation of the crane defendants' *1035 potential liability as required by Tech-Bilt (id., 38 Cal.3d at pp. 499-500), at oral argument it became quite clear that SoCal's real complaint is that neither the settling parties nor the trial court dealt with the rights assigned to the plaintiffs in respect to the NF&M insurance policy in such a way that the nonsettling defendants would be assured of receiving credit for the value of the assigned rights against any eventual judgment as is their statutory right under section 877, subdivision (a) (see fn. 2, ante). SoCal points out that the assigned rights were not valued nor allocated as between the plaintiffs and that although the court specified the nonsettling defendants would get credit for any funds recovered in the declaratory relief action filed by NF&M, no monetary recovery is likely to be had in the declaratory relief action and it is wholly within the discretionary power of plaintiffs whether to pursue or abandon the assigned rights. SoCal urges the trial court should not have made a determination of good faith without including in its order provisions that would ensure the nonsettling defendants would obtain credit for the value of the assigned rights. We agree.
Section 877 specifically provides that "[w]here a release, dismissal ... or a covenant not to sue or not to enforce judgment is given in good faith ... to one or more of a number of tortfeasors claimed to be liable for the same tort  [¶] (a) It shall not discharge any other such tortfeasor from liability unless its terms so provide, but it shall reduce the claims against the others in the amount stipulated by the release, the dismissal or the covenant, or in the amount of the consideration paid for it whichever is the greater." (Italics added.)
It cannot be doubted that the assignment of tort and contract rights in respect to the NF&M insurance policy was a part of the consideration paid for the release of the settling defendants, that the assigned rights were valuable and that under the statute the nonsettling defendants are entitled to credit against any eventual judgment for the value of the assigned rights. Although the court's order purported to provide for such credit it was wholly insufficient to ensure that such credit would be received.
In the first place, it is fairly apparent that the court misspoke itself in purporting to give credit for any funds recovered "from the declaratory relief action" filed by NF&M rather than any funds recovered on account of the assigned rights. There would of course be no recovery of funds in the declaratory relief action unless the insured or its assignee were permitted to and did file a cross-complaint in the action for breach of contract and/or bad faith (see California State Auto. Assn. Inter-Ins. Bureau v. Superior Court (1986) 184 Cal. App.3d 1428 [229 Cal. Rptr. 409]). The record does not indicate that any such cross-complaint has been filed in the declaratory relief action nor was there anything in the court's order that compelled the *1036 plaintiffs to prosecute an action to recover on the assigned rights with due diligence.
Even if we were to construe the court's order as giving credit for any funds recovered on account of the assigned rights, the same problem exists: the court left the decision whether or not to pursue the assigned rights wholly to the discretion of the plaintiffs, affording the nonsettling defendants no remedy in the event the plaintiffs should fail to pursue the assigned rights with due diligence. In addition, neither the settling parties nor the court allocated any recovery on the assigned rights as between the Wyche family and plaintiff Kaeding so as to permit appropriate credit should they both recover judgment against the nonsettling defendants.
It appears to us these problems could have been resolved in one of several ways. First, the value of the assigned rights could have been determined by declaration or if necessary by expert testimony, and the value thus determined could have been allocated as between the plaintiffs by agreement among the settling parties. Alternatively, the court might have provided for credit, as it probably intended to, for any amounts recovered by the plaintiffs on account of the assigned rights, but to ensure that the nonsettling defendants received credit for the value of the assigned rights as they are entitled to under the statute, the court should have conditioned its order determining the settlement to be in good faith on a requirement that the plaintiffs pursue the assigned rights with due diligence. Once again, the settling parties would have had to agree upon an appropriate allocation as between the plaintiffs of any eventual recovery on the assigned rights.
Without provision for these matters it was an abuse of discretion for the trial court to approve the settlement as being in good faith within the meaning of section 877, because in the absence thereof the rights of the nonsettling defendants were unduly, unfairly and unnecessarily impaired. (2) If there was ever any question about the matter, it is now clear that to entitle a settling defendant to a discharge from claims for proportional indemnity or contribution by nonsettling defendants under section 877, the settlement entered into must be in good faith not only in respect to the settling plaintiff or plaintiffs but also in respect to the nonsettling defendants. (Tech-Bilt, Inc. v. Woodward-Clyde & Associates, supra, 38 Cal.3d at pp. 494-495, 496-497; Ex-Cello-Corp. v. Holdener (1986) 181 Cal. App.3d 25, 32-33 [226 Cal. Rptr. 57]; Torres v. Union Pacific R.R. Co. (1984) 157 Cal. App.3d 499, 507 [203 Cal. Rptr. 825]; River Garden Farms, Inc. v. Superior Court (1972) 26 Cal. App.3d 986, 996, 997, 1000 [103 Cal. Rptr. 498]; cf. Rankin v. Curtis (1986) 183 Cal. App.3d 939, 945 et seq. [228 Cal. Rptr. 753].)


*1037 Disposition

Let a peremptory writ of mandate issue to the Riverside Superior Court commanding it to vacate its order determining the settlement between the plaintiffs and the crane defendants to be in good faith and its order dismissing the cross-complaints of nonsettling defendants against the settling defendants and thereafter to proceed and make such orders as are consistent with the views expressed in this opinion.
McDaniel, J., and Rickles, J., concurred.
NOTES
[1]  All statutory citations are to the Code of Civil Procedure unless otherwise specified.
[2]  Section 877 provides: "Where a release, dismissal with or without prejudice, or a covenant not to sue or not to enforce judgment is given in good faith before verdict or judgment to one or more of a number of tortfeasors claimed to be liable for the same tort 

"(a) It shall not discharge any other such tortfeasor from liability unless its terms so provide, but it shall reduce the claims against the others in the amount stipulated by the release, the dismissal or the covenant, or in the amount of the consideration paid for it whichever is the greater; and
"(b) It shall discharge the tortfeasor to whom it is given from all liability for any contribution to any other tortfeasors."
[3]  The cross-complaint filed by the crane subcontractors apparently named as cross-defendants David Kaeding, Teresa Wyche, SoCal and S & E. S & E was granted summary judgment on this cross-complaint. However, the crane defendants lodged a notice of appeal with this court on November 7, 1985, challenging the summary judgment granted S & E in Riverside Superior Court case No. 1-40440, and that appeal is presently pending.
[4]  The order did not purport to dispose of or affect the crane defendants' cross-complaint for indemnity against the other defendants (see fn. 3, ante) but no issue is raised by any party on that account.
