
28 Cal.Rptr.3d 859 (2005)
129 Cal.App.4th 771
The PEOPLE, Plaintiff and Respondent,
v.
Fredrick Rico CHATMON, Defendant and Appellant.
No. A104929.
Court of Appeal, First District, Division Three.
May 23, 2005.
Review Denied August 31, 2005.
Robert Valencia, San Francisco, appointed under the First District Court of Appeal Independent Case System, for Appellant.
Bill Lockyer, Attorney General; Robert R. Anderson, Chief Assistant Attorney *860 General; Gerald A. Engler, Senior Assistant Attorney General; Stan Helfman, Supervising Deputy Attorney General; Margo J. Yu, Deputy Attorney General, for Respondent.
PARRILLI, J.
In April 2003, Fredrick Rico Chatmon pleaded no contest to a charge of cocaine possession. In exchange, the court dismissed a charge of resisting a police officer (Chatmon agreed to a Harvey waiver),[1] suspended imposition of sentence, and placed Chatmon on three years of probation with a 90-day jail term. Chatmon agreed to waive his rights to sue the Vallejo Police Department and to appeal the judgment. In October 2003, the court revoked Chatmon's probation. He had failed to maintain contact with his probation officer, failed to appear for his jail term, failed to perform drug testing, and failed to attend AIDS counseling. The court reinstated Chatmon on probation, conditioned on service of a 180-day jail term. Chatmon waived his presentence custody credits.
The court issued a certificate of probable cause, and Chatmon filed this appeal. He contends the court should have sentenced him to probation and drug treatment under Proposition 36. The Attorney General contends Chatmon is barred from raising this issue because he received the benefit of his plea bargain. We agree. "Where the defendants have pleaded guilty in return for a specified sentence, appellate courts will not find error even though the trial court acted in excess of jurisdiction in reaching that figure, so long as the trial court did not lack fundamental jurisdiction. The rationale behind this policy is that defendants who have received the benefit of their bargain should not be allowed to trifle with the courts by attempting to better the bargain through the appellate process. (People v. Couch (1996) 48 Cal.App.4th 1053, 1056-1057 [56 Cal.Rptr.2d 220]; People v. Nguyen (1993) 13 Cal.App.4th 114, 122-123 [16 Cal.Rptr.2d 490]; see In re Griffin (1967) 67 Cal.2d 343, 347-348 [62 Cal.Rptr. 1, 431 P.2d 625].) ... `When a defendant maintains that the trial court's sentence violates rules which would have required the imposition of a more lenient sentence, yet the defendant avoided a potentially harsher sentence by entering into the plea bargain, it may be implied that the defendant waived any rights under such rules by choosing to accept the plea bargain.' (People v. Couch, supra, 48 Cal.App.4th at p. 1057 [56 Cal.Rptr.2d 220].)" (People v. Hester (2000) 22 Cal.4th 290, 295, 92 Cal. Rptr.2d 641, 992 P.2d 569; see also People v. Vera (2004) 122 Cal.App.4th 970, 983, 18 Cal.Rptr.3d 896 [defendant who receives benefit of plea bargain may not seek to improve bargain on appeal].)
Here, while Chatmon did not bargain for a "specified sentence" as contemplated by the Hester court, he did receive the benefit of probation and dismissal of a charge that, were he convicted, would have disqualified him from treatment under Proposition 36. (Pen. Code, § 1210.1, subd. (b)(2).) As part of the bargain, he agreed to waive his right to appeal. Now, having violated his probation, he appeals from the ensuing judgment, asking us to recast the terms of his plea bargain. We will not entertain such a request.
Chatmon relies on People v. Esparza (2003) 107 Cal.App.4th 691, 699, 132 Cal. Rptr.2d 377, for the proposition that failure to place an eligible defendant in a Proposition 36 program is an error not subject to the waiver doctrine. Esparza is inapposite, because it did not involve a bargained-for sentence.
*861 Chatmon also claims a trial court may not enter into a negotiated disposition that is unauthorized by law, citing People v. Velasquez (1999) 69 Cal.App.4th 503, 81 Cal.Rptr.2d 647, and People v. Harvey (1980) 112 Cal.App.3d 132, 169 Cal.Rptr. 153. Velasquez involved a sentence the court described as "not facially authorized by law" a three-year term for a crime the Legislature made punishable by terms of two, four, or six years. Velasquez had agreed to probation with a prison exposure of no greater than three years. The court observed that this bargain left open the possibility of a lawful two-year term should Velasquez violate his probation, as he did. Under these circumstances, the court declared "[t]his is simply not a case where the defendant should be estopped because he is `trifling' with the courts." (People v. Velasquez, supra, 69 Cal. App.4th at p. 506, 81 Cal.Rptr.2d 647.)
The same cannot be said of Chatmon's case. He has not been sentenced to a prison term. He makes no claim that the three-year maximum to which he is exposed is unlawful. He agreed to a disposition outside the mandates of Proposition 36, in exchange for dismissal of a charge that would have exposed him to additional prison time and precluded any application of Proposition 36. He is attempting to trifle with the courts.
In People v. Harvey, supra, 112 Cal. App.3d 132, 169 Cal.Rptr. 153, the defendant agreed to the imposition of two sentence enhancements when only one was permitted under a Supreme Court decision handed down two days before he was sentenced. (Id. at pp. 137-138, 169 Cal.Rptr. 153.) The Harvey court's statement that a court imposing sentence according to the terms of a plea bargain "may not give effect to an enhancement unauthorized by law" is questionable, in light of People v. Hester, supra, 22 Cal.4th at p. 295, 92 Cal.Rptr.2d 641, 992 P.2d 569, and cases cited therein. In any event, Chatmon's situation is again distinguishable. Unlike Harvey, he was not sentenced to serve a prison term, and had he gone to trial he could have received a lawful sentence consistent with the terms of his plea bargain.
Chatmon also challenges the validity of his waiver of presentence custody credits. First, he suggests he was not "properly informed of his options" when he agreed to waive credits in exchange for a 180-day jail term. The court told Chatmon that he would be given a longer jail term if he did not waive his credits. Chatmon agreed to the waiver, both personally and through counsel. Chatmon's claim that he was not informed of his options appears to rest on his argument that he was entitled to be sentenced under Proposition 36. Having expressly agreed to a different disposition, however, he was not so entitled.
Chatmon further contends the trial court improperly delegated its discretion over custody credits to the probation officer. This claim is meritless. The court read and considered the probation report, and at sentencing informed defense counsel that it intended to give Chatmon a 180-day jail term if he waived his presentence credits, as recommended in the probation report. Counsel initially believed the issue of credits was not addressed in the report, but once she realized her mistake she quickly agreed to the waiver. Nothing in this scenario suggests any improper failure on the part of the court to exercise its discretion.

DISPOSITION
The judgment is affirmed.
We concur: McGUINESS, P.J., and POLLAK, J.
NOTES
[1]  People v. Harvey (1979) 25 Cal.3d 754, 159 Cal.Rptr. 696, 602 P.2d 396.
