
988 So.2d 1128 (2008)
Jetavious YOUNG, a/k/a Jetavius Keon Young, Appellant,
v.
STATE of Florida, Appellee.
No. 2D07-4163.
District Court of Appeal of Florida, Second District.
July 25, 2008.
James Marion Moorman, Public Defender, and Kimberly Nolen Hopkins, Special Assistant Public Defender, Bartow, for Appellant.
Bill McCollum, Attorney General, Tallahassee, and Richard M. Fishkin, Assistant Attorney General, Tampa, for Appellee.
WALLACE, Judge.
Jetavious Young appeals the revocation of his probation and resulting sentence for home-invasion robbery with a firearm in circuit court case number CF02-06478A-XX. In circuit court case number CF06-007091-XX, Mr. Young appeals his judgments and sentences for robbery and robbery with a firearm. Mr. Young's appellate *1129 counsel filed an Anders[1] brief suggesting the possibility of an evidentiary error and an error in the denial of a motion to sever the two robbery charges in case number CF06-007091-XX. Appellate counsel also suggests the possibility of sentencing errors in both cases. We have carefully reviewed the record and find no error concerning the first two issues. However, we do detect error in the sentence imposed for the violation of probation in case number CF02-06478A-XX. Because this error has not been preserved, we affirm without prejudice to Mr. Young's right to file an appropriate postconviction motion.
On October 29, 2003, Mr. Young was adjudicated guilty in case number CF02-06478A-XX of the first-degree felony of home-invasion robbery, a violation of section 812.135, Florida Statutes (2002). The date of the alleged offense was August 7, 2002. Mr. Young was initially sentenced as a youthful offender to four years' imprisonment followed by two years' probation. On August 24, 2007, the trial court revoked Mr. Young's probation based on his conviction for two robberies committed while he was on probation and sentenced him to life in prison. The sentence of life imprisonment in case number CF02-06478A-XX constitutes sentencing error.
"[N]o youthful offender shall be committed to the custody of the [D]epartment [of Corrections] for a substantive violation [of probation] for a period longer than the maximum sentence for the offense for which he or she was found guilty." § 958.14, Fla. Stat. (2002). At the time Mr. Young committed the original offense, home-invasion robbery was a first-degree felony punishable by a maximum sentence of thirty years' imprisonment. §§ 775.082(3)(b), 812.135(2), Fla. Stat. (2002). Because the trial court sentenced Mr. Young to life in prison rather than the maximum sentence of thirty years, the trial court may have imposed an illegal sentence. See Rogers v. State, 972 So.2d 1017, 1019-20 (Fla. 4th DCA 2008).
However, we may not address this sentencing error on direct appeal because Mr. Young did not preserve this issue for appellate review by objecting during the sentencing hearing or by filing a motion in accordance with Florida Rule of Criminal Procedure 3.800(b). Fla. R.App. P. 9.140(e); see Jackson v. State, 983 So.2d 562 (Fla.2008); Brannon v. State, 850 So.2d 452 (Fla.2003). Accordingly, we affirm Mr. Young's judgments and sentences without prejudice to any right he may have to file an appropriate postconviction motion addressing the unauthorized sentence for his violation of probation in case number CF02-06478A-XX.
Affirmed.
WHATLEY and STRINGER, JJ., concur.
NOTES
[1]  Anders v. California, 386 U.S. 738, 87 S.Ct. 1396, 18 L.Ed.2d 493 (1967).
