
112 Ill. App.3d 483 (1983)
445 N.E.2d 816
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee,
v.
TERRY WAELTERMAN, Defendant-Appellant.
No. 81-307.
Illinois Appellate Court  Fifth District.
Opinion filed January 28, 1983.
Randy E. Blue and Dan W. Evers, both of State Appellate Defender's Office, of Mt. Vernon, for appellant.
Don W. Weber, State's Attorney, of Edwardsville (Stephen E. Norris, of State's Attorneys Appellate Service Commission, of counsel), for the People.
Reversed and remanded.
JUSTICE JONES delivered the opinion of the court:
Defendant Terry Waelterman pleaded guilty to a charge of armed violence based upon the predicate felony of aggravated battery using a deadly weapon. The plea was entered pursuant to a plea agreement whereby the State agreed to nolle prosse five other counts. On appeal, the defendant contends that his conviction for armed violence was improper where the charge against him failed to allege a proper predicate felony. We agree and accordingly reverse the defendant's conviction for armed violence. We find, however, that upon remand *484 the State may reinstate the charges against the defendant that were nolle prossed under the plea agreement.
On November 18, 1980, the defendant was charged by information with two counts of aggravated battery, two counts of armed violence and two counts of attempted murder. All six counts were based upon an incident that occurred on August 24, 1980, when the defendant allegedly fired a shotgun through the windshield of a car, hitting two of the five youths inside.
On March 2, 1981, the defendant appeared with counsel and entered a negotiated plea of guilty to count V of the information. Count V charged that the defendant committed the offense of:
"ARMED VIOLENCE in that said defendant while armed with a dangerous weapon, a shotgun, performed acts prohibited by Chapter 38, Illinois Revised Statutes, Section 12-4(b)(1) in that he knowingly and without legal justification shot Timothy J. Murphy in the chest and the side of his body thereby causing bodily harm to Timothy J. Murphy, in Madison County, Illinois in violation of Ill. Rev. Stat. Ch. 38, Section 33a-2."
In exchange for the defendant's plea of guilty to count V, the State agreed to dismiss the other five counts against the defendant. The court accepted the guilty plea and sentenced the defendant to six years with the Department of Corrections.
On April 24, 1981, the defendant filed a pro se motion to withdraw his guilty plea which was denied after a hearing on June 29, 1981. The defendant then filed this appeal, asserting that the trial court erred in not permitting him to withdraw his guilty plea and that his conviction should be reversed because it was based upon a charge that was fatally defective and void. As a result of our disposition herein, we need address only the latter of these issues.
In People v. Haron (1981), 85 Ill.2d 261, 422 N.E.2d 627, it was held that the use of a dangerous weapon which serves to enhance a charge of battery to aggravated battery may not also serve to further enhance the latter charge to armed violence. (Accord, People v. Van Winkle (1981), 88 Ill.2d 220, 430 N.E.2d 987.) As the court stated:
"[T]he requirement of section 33A-2 [the armed violence statute] that there be the commission of a felony while armed with a dangerous weapon contemplates the commission of a predicate offense which is a felony without enhancement by the presence of a weapon." (People v. Haron (1981), 85 Ill.2d 261, 278, 422 N.E.2d 627, 634.)
Thus, where, as in the instant case, the charge of armed violence is based upon the predicate felony of aggravated battery under section *485 12-4(b)(1) of the Criminal Code of 1961 (Ill. Rev. Stat. 1979, ch. 38, par. 12-4(b)(1)) which itself is based upon the use of a deadly weapon in the commission of a battery, the charge is defective and cannot stand.
We find no merit in the State's argument that the armed violence charge was sufficient under the standard of People v. Gilmore (1976), 63 Ill.2d 23, 344 N.E.2d 456, which applies when a charge is attacked for the first time on appeal. The court there held that an information or indictment is sufficient when attacked for the first time on appeal "if it apprised the accused of the precise offense charged with sufficient specificity to prepare his defense and allow pleading a resulting conviction as a bar to future prosecution arising out of the same conduct." (63 Ill.2d 23, 29, 344 N.E.2d 456, 460.) Thus, while an allegation that a charge is void can be raised at any time and is not waived by failure to object at trial (People v. Walker (1980), 83 Ill.2d 306, 415 N.E.2d 1021; People v. Gresham (1982), 104 Ill. App.3d 81, 432 N.E.2d 654), a defective charge may be held to be sufficient on appeal if the defendant has not been prejudiced thereby in his defense. See People v. Pujoue (1975), 61 Ill.2d 335, 335 N.E.2d 437; People v. Rege (1976), 64 Ill.2d 473, 356 N.E.2d 537.
The Gilmore line of cases is distinguishable from the instant case, however, because of the nature of the defects there alleged. In those cases the charging document was challenged on appeal due to omission of a material element of the offenses charged. The court found from the record of the trial that no prejudice had resulted from the omission. People v. Pujoue (defendant was not prejudiced by failure of complaint charging violation of section 24-1(a)(10) (Ill. Rev. Stat. 1973, ch. 38, par. 24-1(a)(10)) (unlawful use of weapons) to allege that gun was loaded where defendant testified that the gun "accidentally went off"); People v. Gilmore (forgery charge failed to name payee of check but the check was available to defendant at preliminary hearing); People v. Walker (failure of attempted murder charge to allege that defendant acted with intent to kill did not prejudice his defense where defendant implicitly acknowledged his intent to shoot victim).
 1 In the instant case, the charge against the defendant appeared to be complete in that it included all the necessary statutory elements for the offense of armed violence. By application of the Haron rule, however, it failed to allege a proper predicate felony. There is no indication that the defendant was aware of the true nature of the charge against him when he entered his plea of guilty, and we cannot say therefore that no prejudice resulted. Although, as the State points out, the factual circumstances in the instant case may *486 have supported a plea of guilty to one or more of the dismissed counts, this fails to justify holding the defendant to his plea of guilty to a defective charge.
 2 Our reversal of the defendant's conviction for armed violence, which followed from a negotiated plea agreement with the State, raises the question of whether the State may, upon remand, reinstate the charges which were nolle prossed under the terms of the plea agreement. The supreme court in People v. McCutcheon (1977), 68 Ill.2d 101, 368 N.E.2d 886, held that such charges may be reinstated where the defendant successfully appeals a conviction based upon a guilty plea. Since a nolle prosequi entered before jeopardy has attached does not operate as an acquittal so as to prevent a subsequent prosecution for the same offense but leaves the matter in the same condition as before the prosecution (People v. McCutcheon), and since the defendant has successfully challenged the conviction resulting from his negotiated plea agreement, the State may, upon remand, consider reinstatement of the charges which were nolle prossed under the agreement. (This, of course, does not include reinstatement of the other count of armed violence which suffers from the same defect as that discussed in this order.) We therefore reverse and remand this cause with directions to proceed in accordance with the views expressed herein.
Reversed and remanded.
KARNS and KASSERMAN, JJ., concur.
