
167 Cal.App.3d 857 (1985)
213 Cal. Rptr. 526
STEVEN KROFF, Plaintiff and Appellant,
v.
IVER LARSON et al., Defendants and Respondents.
Docket No. A024881.
Court of Appeals of California, Sixth District.
May 2, 1985.
*859 COUNSEL
Steven Kroff, in pro. per., for Plaintiff and Appellant.
Maurice Kemp for Defendants and Respondents.
OPINION
PANELLI, P.J.
This is an appeal from a judgment of dismissal entered on plaintiff's (appellant) first amended complaint following the sustaining of defendants' (respondents) demurrer. On this appeal we are asked to determine whether an attorney hired to prosecute a bodily injury action, pursuant to a contingent fee agreement, may, after being substituted out of the case, recover costs advanced on behalf of the client, while the bodily injury suit is still pending. We determine he may not and affirm the judgment of dismissal.

Facts
Appellant, an attorney, was employed by respondents, pursuant to a "Legal Services Contract  Contingent Fee Case" to represent them in a bodily injury action. The agreement provided for a percentage attorney fee and the reimbursement of costs advanced by the attorney, contingent on recovery by the clients. Appellant proceeded to represent the respondents and filed a lawsuit on their behalf. Before any recovery was obtained, respondents discharged appellant and retained another attorney to represent them. Appellant wrote respondents seeking reimbursement for costs advanced in the amount of $702.48. When respondents failed to pay appellant for the costs advanced, he filed a law suit to collect attorney fees and costs.
Appellant's complaint alleged that he was discharged by respondents without cause. The complaint also sought to recover attorney fees and costs advanced. Respondents filed a general demurrer contending that the action was premature since the contingency (recovery by the client) had not yet occurred. The demurrer was sustained on this ground, without leave to amend. A judgment of dismissal was entered and this appeal follows.
On this appeal, appellant challenges the judgment rendered below only as to the causes of action which sought reimbursement of costs advanced by him on behalf of the respondents.


*860 Discussion

(1) In California it is clear that a client has an absolute right at any time to discharge an attorney, with or without cause. (Fracasse v. Brent (1972) 6 Cal.3d 784, 792 [100 Cal. Rptr. 385, 494 P.2d 9].) An attorney discharged by a client without cause has a quantum meruit cause of action for the reasonable value of services rendered to the date of discharge. Such cause of action, however, does not accrue until the occurrence of the stated contingency, i.e., recovery by the client either by settlement or judgment. (Ibid.)
(2) In this case it is appellant's contention that Fracasse is not controlling since our high court considered the issue of attorneys fees due under a contingent fee contract and did not address the issue of costs. Appellant argues that the reasoning of the court has no applicability to the issue of whether costs advanced by the attorney may be recovered before the contingency occurs. We do not read Fracasse so narrowly.
As appellant correctly suggests, in Fracasse, one of the concerns of our high court was the impossibility of ascertaining an attorney fee which is dependent on the "result obtained," until the "amount involved" has been determined by a resolution of the client's claim. Accordingly, appellant argues that, where, as here, the amount of costs advanced is known and precise, Fracasse is not controlling. We disagree. The speculativeness of the fee was only one factor considered by the court. As it stated, "[s]econd, and perhaps more significantly, we believe it would be improper to burden the client with an absolute obligation to pay his former attorney regardless of the outcome of the litigation." (6 Cal.3d at p. 792.) The court clearly was concerned that a client not be burdened with any financial obligation to his former attorney before the occurrence of the stated contingency. We believe this concern is reasonable and justifiable. We believe this is especially true here, in view of the express provisions contained in the contingent fee agreement under review.
The agreement signed by the parties to this appeal provided in part, "[c]osts advanced will be reimbursed to attorney out of the gross recovery on behalf of client." (Italics added.) The agreement also provided for a "lien for reimbursement of costs advanced ... on any recovery made for client...." (Italics added.) It is clear to us that the parties expressly contemplated that costs be paid from a recovery by the client, whether it be by settlement or judgment. Recovery was therefore the contingency which had to occur before the client was obligated to reimburse the attorney for costs.
Our conclusion, moreover, is buttressed by two cases decided after Fracasse. In Bandy v. Mt. Diablo Unified Sch. Dist. (1976) 56 Cal. App.3d 230 *861 [126 Cal. Rptr. 890], a discharged attorney attempted to file a lien against his client's pending personal injury suit. The contingent fee contract entered into by the attorney and client gave the attorney a lien for attorney fees and costs on any recovery by the client. The trial court granted the attorney's motion for a lien and the client appealed. The appellate court reversed, stating, "[u]nder the holding and reasoning of Fracasse the orders of the court below determining the amount of reasonable attorney fees and costs in each action was improper and premature as the contingency stated in the contract had not occurred." (Id., at p. 234; italics added; see also Mason v. Levy & Van Bourg (1978) 77 Cal. App.3d 60, 66 [143 Cal. Rptr. 389] [any action based on a contingent fee contract accrues only when the stated contingency occurs].)
(3) Based on the foregoing authority, the obligation to reimburse the attorney for costs advanced, matures, if at all, only upon the occurrence of the agreed contingency, i.e. recovery by the client. Accordingly, appellant was premature with his lawsuit and the trial court correctly sustained respondents' demurrer.
(4) Appellant expresses concern that an attorney who is discharged by his client before a recovery is achieved is left without a remedy. We think not. The Bandy court addressed this very issue, "[w]e observe that the agreement for a lien is decisive as to its existence and constitutes a valid equitable assignment pro tanto of the judgment or the proceeds received by way of settlement. [Citation.] In the case of an attorney who has been granted a lien pursuant to a contingent fee contract and who has rendered services called for by such contract, but who has been discharged prior to the happening of the contingency stated in the contract, all that remains to be done by him, once the contingency has occurred (i.e., recovery by settlement or judgment), is to seek an adjudication in an independent action of the reasonable amount of the attorney fees due him for his services in the light of his former client's recovery and the reasonable amount of the costs advanced by him. He is also entitled, upon such determination and in the same action, to seek enforcement of his lien." (Bandy v. Mt. Diablo Unified Sch. Dist., supra, 56 Cal. App.3d 230, at p. 235.)
Additionally, the judgment entered here, upon a demurrer on the ground of premature action, is a plea in abatement which does not go to the merits. Accordingly, such a judgment does not act as a bar to a subsequent suit when the cause of action accrues. (Mercer Casualty Co. v. Lewis (1940) 41 Cal. App.2d 918, 923 [108 P.2d 65].)
(5) Respondents contend that this appeal was frivolous and ask for attorneys fees and costs as sanctions under rule 26(a) of the California Rules *862 of Court. While this appeal does appear to us to have very little merit, we decline to impose sanctions. However, the terms of the contingent fee agreement provide "[i]n any action brought hereunder to enforce the terms of the Agreement, the prevailing party must be awarded his reasonable attorneys fees." A provision in a contract which provides for reasonable attorneys fees to the prevailing party is applicable to services rendered on appeal. (Wilson v. Wilson (1960) 54 Cal.2d 264, 272 [5 Cal. Rptr. 317, 352 P.2d 725].) Here, respondents have prevailed on this appeal and are therefore entitled to recover their reasonable attorney fees incurred in this appeal.[1]
The judgment is affirmed. The matter is remanded to the trial court for the determination of an award of reasonable attorney fees to respondents for services rendered to them on this appeal only, together with costs.
Agliano, J., and Brauer, J., concurred.
NOTES
[1]  Respondents did not seek attorney fees in the trial court and accordingly any claim for attorney fees in defending the action below has been waived.
