¶1Hector Diaz appeals from the trial court’s denial of his motion to withdraw his guilty plea to rape, OCGA§ 16-6-1. Findingno error, we affirm.
¶2The record shows the following undisputed facts. A Gwinnett County grand jury indicted Diaz for aggravated child molestation, OCGA § 16-6-4 (c); rape, OCGA § 16-6-1; child molestation, OCGA § 16-6-4 (a); and incest, OCGA § 16-6-22. Diaz entered negotiated guilty pleas on the aggravated child molestation and rape charges, and the court sentenced him to 20 years to serve on the rape conviction and a consecutive term of 20 years of probation on the aggravated child molestation conviction.*
¶3In January 2005, the office of the Attorney General of the State of Georgia notified the district attorney’s office that the sentence of twenty years on probation for the aggravated child molestation was void because it failed to comply with OCGA § 17-10-6.1 (b), which requires a minimum sentence of ten years to serve in prison for aggravated child molestation. Following a resentencing hearing, the *135trial court vacated the sentence on the aggravated child molestation conviction and entered a nolle prosequi on the charge. The court’s order specifically stated that it did not affect the 20-year sentence on the rape.
¶4On appeal, Diaz relies upon State v. Stuckey, 145 Ga. App. 434 (243 SE2d 627) (1978), for the proposition that if a defendant pleads guilty to two counts of an indictment and is sentenced for both, and then one of the sentences is later deemed void, the other sentence is automatically void. Stuckey, however, does not stand for that proposition and is distinguishable on the facts from the instant case. In Stuckey, the defendant pled guilty to armed robbery and aggravated assault, and the court sentenced him to five years on probation. Id. The sentence was apparently intended to cover both crimes in the aggregate, although this Court’s opinion is unclear on the issue. Id. After determining that the applicable sentencing statute did not allow for a probated sentence for armed robbery, the State moved to amend the sentence. Id. The trial court refused to amend the sentence, and the State appealed. Id. This Court ruled that the probated sentence for armed robbery was void and remanded the case to the trial court for resentencing. Id. at 434-435. Notably, this Court’s ruling is silent as to the aggravated assault conviction or any sentence thereon. Id.
¶5In contrast to the facts in Stuckey, the record in this case shows that the trial court imposed a separate and distinct sentence for each of the two counts of the indictment, aggravated child molestation and rape, with the sentences to run consecutively. The trial court’s order vacating the probated sentence for aggravated child molestation specifically stated that the order did not affect the rape sentence. Diaz has not shown any basis for finding the 20-year sentence for rape was illegal or void, other than his misplaced reliance on Stuckey.
¶6Under the circumstances, we see no basis for finding that Diaz’s sentence on the rape conviction was void. See Reynolds v. State, 272 Ga. App. 91, 94 (2) (611 SE2d 750) (2005) (a sentence is void if it *136imposes punishment that the law does not allow, and as long as the sentence falls within statutory guidelines, it is not void). Therefore, Diaz did not have the right to withdraw his guilty plea to the rape charge prior to resentencing on that charge. See State v. Smith, 193 Ga. App. 831, 832 (1) (389 SE2d 547) (1989) (after the trial court improperly merged eight counts of armed robbery into other counts for sentencing, the case was remanded for resentencing on those eight counts only; this Court did not find that the other sentences were void). Cf. Crews v. State, 142 Ga. App. 319, 322 (8) (235 SE2d 756) (1977) (trial court sentenced defendant in the aggregate on multiple counts; when defendant’s conviction on one count was reversed on appeal, resentencing was required on the remaining counts).
¶7Judgment affirmed.
¶8 The trial court entered a nolle prosequi on the remaining charges.
¶9 It is undisputed that the 20-year sentence for the rape conviction does not violate a sentencing or other statute.