#### THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee, v. ROOSEVELT HOBSON, JR., Defendant-Appellant.

Third District

No. 3-88-0722

Opinion filed June 21, 1989.

Kenneth D. Brown, of State Appellate Defender’s Office, of Ottawa, for appellant.

John A. Barra, State’s Attorney, of Peoria (Gary F. Gnidovec, of State’s Attorneys Appellate Prosecutor’s Office, of counsel), for the People.

JUSTICE STOUDER

delivered the opinion of the court:

The defendant, Roosevelt Hobson, Jr., was charged with unlawful use of a weapon. (Ill. Rev. Stat. 1987, ch. 38, par. 24 — 1(a)(4).) The of*55fense was enhanced from a misdemeanor to a Class 4 felony because he had a prior conviction for the same offense. (Ill. Rev. Stat. 1987, ch. 38, par. 24 — 1(b).) Following a bench trial, the defendant was convicted and sentenced to 15 months’ probation, conditioned upon his serving 38 days in the county jail. He appeals. We affirm.

Prior to trial, the defendant filed a motion in limine requesting that the State be prohibited from introducing any evidence of his prior conviction. In support of his motion, he relied upon Baldasar v. Illinois (1980), 446 U.S. 222, 64 L. Ed. 2d 169, 100 S. Ct. 1585, which held that a defendant’s prior uncounseled conviction could not be used to enhance a subsequent conviction from a misdemeanor to a felony. The defendant’s motion alleged that even though he had been represented by counsel in the prior case, the representation was ineffective and therefore amounted to no representation. Thus, he contended that his prior conviction could not be used to enhance his present offense.

At the hearing on the motion, the defendant testified about his prior conviction. He stated that he had been stopped by a Peoria police officer because the light over his car’s license plate was not working. After the officer issued him a ticket for the violation, another officer arrived on the scene and the two began searching the defendant’s car. According to the defendant, the officers did not produce a search warrant nor did they obtain his consent. A gun in the glove compartment was subsequently found, and the defendant was arrested for unlawful use of a weapon.

The defendant further testified that he was represented by the public defender in that case, but that he only met with his attorney on the day of the arraignment and on the day he entered his guilty plea. He also testified that the public defender did not tell him that a motion to suppress might prevent the gun from being used as evidence. No motion to suppress was made. The court accepted the defendant’s plea of guilty and entered a judgment of conviction. It then sentenced him to one year of probation, conditioned upon his serving five days in the Peoria County jail. The defendant did not file a motion to withdraw his guilty plea and did not appeal his conviction or sentence.

After hearing the defendant’s testimony, the trial court denied his motion in limine and the case proceeded to trial. The evidence showed that on November 21, 1987, police officer Ron Shipp was called to investigate a fight at a convenience store. The stipulated testimony of Officer Shipp was that when he arrived at the scene a bystander told him that if anyone was going to be arrested it should be the man with the gun. The bystander then pointed in the direction of *56two black males. Officer Shipp subsequently searched the defendant and retrieved a loaded .38 caliber gun from his waist. Based on the evidence, the trial court convicted the defendant of unlawful use of a weapon.

On appeal, the defendant argues that his testimony at the motion in limine hearing established that the prior misdemeanor conviction was obtained in violation of his sixth amendment right to the effective assistance of counsel. He also argues that because of this denial of his right to the effective assistance of counsel, the use of the prior conviction as an enhancing factor in the instant case deprived him of his constitutional right to due process of law.

We need not determine whether the defendant was denied his right to the effective assistance of counsel, because we find that he pled guilty to the prior misdemeanor charge and is therefore estopped from collaterally attacking his prior conviction. It is well established that a voluntary plea of guilty waives all nonjurisdictional errors, including violations of constitutional rights. (People v. Ondrey (1976), 65 Ill. 2d 360, 357 N.E.2d 1160; People v. Weathers (1980), 83 Ill. App. 3d 451, 404 N.E.2d 1011.) By pleading guilty to the prior offense, the instant defendant waived any claim that he was denied effective assistance of counsel in that case. (See People v. Sprinkle (1976), 39 Ill. App. 3d 740, 350 N.E.2d 536.) Accordingly, we find that the defendant has waived any claim of ineffective assistance of counsel and that the prior misdemeanor conviction was properly used to enhance the current offense from a misdemeanor to a felony.

The decision of the circuit court of Peoria County is affirmed.

Affirmed.

WOMBACHER, P.J., and SCOTT, J., concur.