
244 S.W.3d 543 (2007)
The STATE of Texas, Appellant
v.
Everett Dale WEBB, Appellee.
No. 01-07-00689-CR.
Court of Appeals of Texas, Houston (1st Dist.).
December 20, 2007.
*544 Renee Ann Mueller, Dist. Atty., Brenham, Stephen Christopher Taylor, Humble, for the State of Texas.
Forrest L. Sanderson III, Bastrop, for Appellee.
*545 Panel consists of Justices NUCHIA, JENNINGS, and KEYES.

OPINION
TERRY JENNINGS, Justice.
Appellant, the State, challenges the trial court's order granting appellee, Everett Dale Webb's, application for a writ of habeas corpus[1] and ordering a new trial. In its sole point of error, the State contends that the trial court lacked jurisdiction to hear Webb's application for a writ of habeas corpus as Webb "could [have] obtainfed] the requested relief by means of an appeal" and because Webb failed to show how he was harmed by the trial court's "illegal grant of probation" to Webb in the underlying case[2] for the offense of sexual assaults[3]
We affirm.

Procedural Background
On February 20, 2007, Webb, represented by court-appointed counsel, Michael L. Glover, pleaded guilty to the offense of sexual assault. The trial court found Webb guilty, assessed his punishment at confinement for five years, suspended the sentence, placed Webb on community supervision for five years, and imposed a fine of $1,000. Because Webb entered into a plea bargain agreement with the State and the punishment did not exceed the punishment recommended by the State, the trial court refused to certify Webb's right to appeal.[4] On March 21, 2007, Webb, still represented by Glover, filed a motion for new trial, asserting that his guilty plea was involuntary. At the conclusion of the May 4, 2007 hearing on the motion, the trial court denied Webb a new trial, and Webb filed a pro se direct appeal, assigned to this Court. The trial court then appointed Webb a new attorney, Forrest L. Sanderson, III.
Webb, on May 29, 2007, filed a "Motion for Permission to Appeal" with the trial court, along with an amended notice of appeals[5] Also, on that same day, Webb filed his application for a writ of habeas corpus, in which he asserted that his trial counsel, Glover, had provided ineffective assistance of counsel in handling his motion for new trial. Specifically, Webb asserted that the trial court erred in placing him on community supervision because the Texas Code of Criminal Procedure prohibits a trial court from granting community supervision for the offense of sexual assault[6] and that his trial counsel had rendered ineffective assistance by failing to tell him that he was ineligible for community supervision and that by pleading guilty he would have to register as a sex offender.
The trial court held a hearing on Webb's application on July 10, 2007, and Glover testified that, in the motion for new trial, he did not assert that the trial court had unlawfully granted Webb community supervision because "it did not come into my mind as something that we could have a motion for new trial granted on, so I did not research that aspect of the law." Glover *546 also stated, "with the information have now and the research. I've done since[,] then that would have been really the number one and probably the only issue . . . I would have filed," Glover noted that Webb was adamant during the motion for new trial hearing that he was not guilty and would not have accepted any punishment because it would require him to register as a sex offender.
On July 27, 2007, the trial court granted Webb's application, expressly finding that if Glover had asserted the unlawful granting of community supervision as a ground for new trial, "the [c]ourt would have granted [Webb] a new trial." In its conclusions of law, the trial court concluded that Webb received ineffective assistance of counsel because "[t]rial counsel's failure to timely raise the issue of the illegality of placing [Webb] on community supervision during the hearing on the motion for new trial constitutes objectively deficient conduct" and, had it been raised, "the motion for new trial would otherwise have been granted."

Jurisdiction
The State first argues, essentially, that the trial court lacked jurisdiction to hear Webb's application for a writ of habeas corpus because Webb could have obtained the requested relief by direct appeal and, in fact, a direct appeal is currently pending before this Court.[7]See TEX.CODE Crux PROC. ANN. art. 11.072, § 3(a) (Vernon 2005).
Habeas corpus is an extraordinary remedy and is available only when there is no other adequate remedy at law. Ex parte Cruzata, 220 S.W.3d 518, 520 (Tex.Crim.App.2007). Article 11.072 establishes the procedures for an applicant to seek habeas corpus relief "from an order or a judgment of conviction ordering community supervision." TEX.CODE CRIM. PROC. ANN. art. 11.072, § 1 (Vernon 2005). This application, however, may not be filed "if the applicant could obtain the requested relief by means of an appeal under Article 44.02 and Rule 25.2, Texas Rules of Appellate Procedure." Id. § 3(a). A defendant may raise a claim of ineffective assistance of counsel by filing an application under article 11.072 when challenging a conviction ordering community supervision. See Arreola v. State, 207 S.W.3d 387, 390 (Tex. App.-Houston [1st Dist.] 2006, no pet.). As explained by the Texas Court of Criminal Appeals, a "record on direct appeal is generally inadequate to show that counsel's conduct fell below an objectively reasonable standard of performance, and the better course is to pursue the claim in habeas proceedings." Freeman v. State, 125 S.W.3d 505, 511 (Tex.Crim.App.2003).
Here, when representing Webb in filing and handling his new trial motion, Glover did not assert that Webb's plea agreement for community supervision was in violation of the Texas Code of Criminal Procedure. Thus, there is no record in the direct appeal of why Glover did not assert this ground in the new trial motion. Because there is no record in the direct appeal as to why Glover did not assert this ground in the new trial motion, Webb would not be able to challenge Glover's performance in the direct appeal. See id. Thus, the only way to develop a record showing why Glover had in fact failed to assert in the new trial motion that the plea bargain agreement was in violation of the Texas Code of *547 Criminal Procedure was through an application for a writ of habeas corpus.
We note that although Webb filed a pro se notice of appeal after the trial court denied his new trial motion, in a plea-bargained case in which the punishment assessed does not exceed the plea agreement, a defendant may only appeal matters raised in a pretrial motion or by obtaining the trial court's permission. See TEX.R.APP. P. 25.2(a). We must dismiss an appeal when the trial court's certification shows there is no right to appeal. See TEX.R.App. P. 25.2(d). Here, the punishment assessed did not exceed the plea agreement, Webb did not file a pretrial motion, and the trial court certified that Webb had no right to appeal. Thus, Webb could not "obtain the requested relief by means of an appeal" because he had no right to appeal. See TEX.CODE CRIM. PROC. ANN. art. 11.072, § 3(a).
Accordingly, we hold that the trial court had jurisdiction to hear Webb's application for a writ of habeas corpus.

Ineffective Assistance of Counsel
The State next argues that the trial court abused its discretion in granting Webb habeas corpus relief because "[Webb] has failed to show how he was harmed by the illegal grant of probation." It asserts that "granting community supervision, even to a statutorily ineligible defendant, is not a `sentence' and therefore cannot be an illegal or void sentence."
In a habeas corpus proceeding, the applicant has the burden to prove his claims by a preponderance of the evidence. Ex parte Peterson, 117 S.W.3d 804, 818 (Tex.Crim.App.2003). In reviewing a trial court's decision to grant or deny habeas corpus relief, we view the facts in the light most favorable to the trial court's ruling. Id. at 819. We afford "`almost total deference to a trial court's determination of the historical facts that the record supports especially when the trial court's fact findings are based on an evaluation of credibility and demeanor.'" Id. (quoting Guzman v. State, 955 S.W.2d 85, 89 (Tex. Crim.App.1997)). In such instances, we utilize an abuse of discretion standard. Id. We afford the same amount of deference to the trial court's ruling on "application of law to fact questions," if the resolution of those ultimate questions turns on an evaluation of credibility and demeanor. Id. However, if the resolution of those ultimate questions turns on an application of legal standards absent any credibility issue, we review the determination de novo. Id.
In order to prove an ineffective assistance of counsel claim, a defendant must show that his counsel's performance fell below an objective standard of reasonableness and, but for his counsel's unprofessional error, there is a reasonable probability that the result of the proceedings would have been different. Strickland v. Washington, 466 U.S. 668, 687, 104 S.Ct. 2052, 2064, 80 L.Ed.2d 674 (1984); Vasquez v. State, 830 S.W.2d 948, 949 (Tex. Crim.App.1992). A reasonable probability is a "probability sufficient to undermine Confidence in the outcome." Strickland, 466 U.S. at 694, 104 S.Ct. at 2068. In reviewing counsel's performance, we look to the totality of the representation to determine the effectiveness of counsel, indulging a strong presumption that his performance falls within the wide range of reasonable professional assistance or trial strategy. Thompson v. State, 9 S.W.3d 808, 813 (Tex.Crim.App.1999). Furthermore, a claim of ineffective assistance must be firmly supported in the record. Id.
Before this Court may conclude that Glover, Webb's trial counsel, rendered ineffective assistance, Webb must show that *548 if Glover had asserted that Webb was entitled to a new trial because his sentence was in violation of the Texas Code of Criminal Procedure, the trial court would have erred in denying the motion. See Jacoby v. State, 227 S.W.3d 128, 131 (Tex. App.-Houston [1st Dist.] 2006, pet. ref'd); Vaughn v. State, 888 S.W.2d 62, 74 (Tex. App.-Houston [1st Dist.] 1994), aff'd, 931 S.W.2d 564 (Tex.Crim.App.1996).
After a guilty plea, a trial court generally has the discretion to suspend the imposition of a sentence and place a defendant on community supervision. TEX.CODE CRIM. PROC. ANN. art. 42.12, § 3(a) (Vernon Supp.2007). However, a trial court may not grant community supervision when a defendant is adjudged guilty of sexual assault. Id. § 3g(a)(1)(H) (Vernon Supp. 2007).
Citing Speth v. State in its conclusions of law, the trial court granted Webb habeas corpus relief because if Glover had asserted in his motion for new trial that the trial court unlawfully sentenced Webb to community supervision after being adjudged guilty of sexual assault, the trial court would have granted Webb's motion for new trial. Cf. 6 S.W.3d 530, 534 n. 10 (Tex.Crim.App.1999) (noting that trial court abuses its discretion by imposing unlawful conditions of community supervision).
In Speth, the Texas Court of Criminal Appeals stated that a "defendant who benefits from the contractual privilege of probation, the granting of which does not involve a systemic right or prohibition, must complain at trial to conditions he finds objectionable." See id. at 534. The court explained that an objection "allows the trial court the opportunity to either risk abusing his discretion by imposing the condition over objection or reconsider the desirability of the contract without the objectionable condition." Id. at 534-35 (foot-note omitted). The court noted, "We do not hold that a trial court does not abuse its discretion by imposing conditions that are unreasonable or violate constitutional rights or statutory provisions," but "such defects must be timely objected to in order to be raised on appeal." Id. at 534 n. 10.
In support of its argument that the trial court abused its discretion in granting Webb habeas corpus relief, the State relies on Ex pane Williams, 65 S.W.3d 656 (Tex. Crim.App.2001). In Williams, the trial court placed the defendant on community supervision even though he had been convicted of the offense of aggravated assault, which in combination with the trial court's deadly weapon finding, precluded the trial court from granting the defendant community supervision. Id. at 656-57; see TEX CODE CRIM. PROC. ANN. art. 42.12, § 3g(a)(2) (Vernon Supp.2007). After the trial court revoked the defendant's community supervision, the defendant sought habeas corpus relief, alleging that the unlawful community supervision rendered his sentence illegal. Williams, 65 S.W.3d at 656-57. The court disagreed, holding that because community supervision is not "a sentence" or even a part of "a sentence," unlawfully granting community supervision does not render the sentence illegal or void. Id. at 657. The court also held that the defendant was not entitled to habeas relief because his "speculative" assertion that he "may" not have pleaded guilty if he had known that he was ineligible for community supervision did not establish by a preponderance of the evidence that he was harmed. Id. at 658.
However, unlike in Williams, Webb did not accept the benefits of community supervision and wait until the trial court revoked his community supervision before seeking relief. See id. at 656-57 (attacking unlawful grant of community supervision by seeking habeas corpus relief after *549 trial court revoked supervision). Instead, Webb immediately attacked his conviction by filing an application for a writ of habeas corpus that alleged ineffective assistance of counsel.
Also, unlike in Williams, Webb unequivocally stated that he would not have pleaded guilty had he known that he was not eligible for community supervision. See id. at 658 (reasoning that speculative assertion that defendant "may" not have pleaded guilty did not show harm). Glover, Webb's trial counsel, did not assert the most obvious ground for relief, which was the trial court's unlawful granting of community supervision, and, in its findings of fact, the trial court explicitly stated that if Glover had raised this ground, it would have granted Webb's motion for new trial. Cf. Speth, 6 S.W.3d at 534 n. 10 (noting that trial court abuses its discretion in imposing unlawful conditions on community supervision). At the hearing on Webb's application for a writ of habeas corpus, Glover testified that this ground of relief was not something that came to his mind because he "did not research that aspect of the law." Glover also conceded that in retrospect and after researching the issue after the new trial hearing, he would probably have asserted only that one issue as entitling Webb to a new trial.
We hold that Webb has demonstrated that his trial counsel's performance fell below an objective standard of reasonableness. Cf. Ex parte Welch, 981 S.W.2d 183, 185 (Tex.Crim.App.1998) (noting that in order for trial counsel to render effective assistance, counselor "must be sufficiently abreast of developments in criminal law aspects implicated in the case at hand"). Moreover, Webb has demonstrated that there is a reasonable probability that the result of the proceeding would have been different. Accordingly, we further hold that the trial court did not abuse its discretion in granting Webb's application for a writ of habeas corpus and ordering a new trial.
We overrule the State's sole point of error.

Conclusion
We affirm the order of the trial court.
NOTES
[1]  See TEX.CODE CRIM. PROC. ANN. art. 11.072, § 8 (Vernon. 2005).
[2]  Webb v. State, No. 14,692 in the 21st District Court of Washington County, Texas, the Honorable Terry L. Flenniken presiding.
[3]  See TEX. PENAL Cone ANN. § 22.011(a) (Vernon Supp.2007).
[4]  See TEX.R.APP. P. 25.2(a)(2), (d).
[5]  Although Webb asserted that the trial court has granted him permission to pursue a direct appeal, the record does not support the assertion.
[6]  See TEX.CODE CRIM. PROC. ANN. art. 42.12, § 3g(a)(1)(1)(H) (Vernon Supp.2007).
[7]  Webb v. State, No. 01-07-00412-CR, 2007 WIL 4465385 (Tex.App.-Houston [1st Dist.] filed Dec. 20, 2007). Additionally, we note that Webb filed a "Motion to Transfer Records" from his direct appeal, cause number 01-07-00412-CR, to the instant case. Webb's motion is denied.
