OPINION
Keasler, J.,delivered the opinion of the Court,
in which Johnson, Hervey, Alcala, Richardson, and Newell, JJ., joined.Does estoppel bar an applicant from seeking habeas corpus relief for a conviction based on a statute subsequently declared facially unconstitutional? We hold that it does not. We accordingly set aside Patrick Shay’s conviction and remand the cause to the trial court to dismiss the indictment.
I.
Pursuant to a plea bargain, Shay was convicted of improper photography or visual recording in violation of Texas Penal Code § 21.15(b)(1) and sentenced to two years’ confinement, the maximum confinement permitted for the state-jail felony. In consideration for Shay’s guilty plea, the State agreed not to file aggravated sexual assault or child pornography charges surrounding the same criminal episode. Shay’s writ application prays for habeas relief by relying on this Court’s opinion in Thompson v. State.1 Five years after Shay’s conviction, this Court held in Thompson that a portion of the former improper photography or visual recording statute—specifically, Texas Penal Code § 21.15(b)(1)—was facially unconstitutional in violation of the First Amendment.2 Section 21.15(b)(1) formed the basis of Shay’s conviction.
The State and the habeas judge recommended that this Court grant Shay relief under Thompson. We ordered Shay’s application be filed and set to determine whether an applicant, who negotiates a very favorable plea agreement resulting in a conviction for an offense later held to be unconstitutional, is estopped from challenging the conviction on the basis of its unconstitutionality.3'
II.
A.
Shay’s improper photography conviction has discharged, and he therefore is not physically confined by virtue of the challenged conviction. But because the State used Shay’s improper-photography conviction as a predicate for its later prosecution against him for being a felon in possession of a firearm, Shay suffers sufficient collateral consequences that we consider him “confined” for purposes of Texas Code of Criminal Procedure Article 11.07, § 3(c).4 Thus this Court has jurisdiction to entertain the merits of Shay’s application.
The dissent, however, would dismiss Shay’s application for failing to establish that the subsequent felon-in-possession case is a sufficient collateral consequence of his improper-photography conviction.5 *733The dissent’s conclusion hinges on the theory that granting relief on the improper-photography conviction does not affect Shay’s liability under the felon-in-possession statute.6 Before accepting jurisdiction of an application, the dissent would require an applicant who is not physically confined to demonstrate that not only is he suffering a collateral consequence from his conviction, but that granting the relief sought would remove the fact of the collateral consequence or mitigate the length of the collateral consequence.7 The dissent fuses the potential result of granting relief with the Court’s jurisdiction to hear the claim in the first place. But these are distinct questions: one addresses whether the Court may entertain Shay’s claim; the other addresses the consequences of granting relief.
In this case, our Article 11.07 jurisdiction does not turn on whether a subsequent prosecution relying upon the contested conviction would be completely undermined if, upon review of the application’s merits, we were to grant relief. Shay’s potential culpability for the felon-in-possession offense is irrelevant to whether he demonstrates “any collateral consequences”8 of the conviction he now challenges.9 Demonstrating collateral consequences is a jurisdictional requirement that, in Ex parte Harrington’s words, simply “trigger[s] application of art. 11.07.”10 Shay has done so, and therefore availed himself of an Article 11.07 remedy. Whether relief ultimately alleviates an applicant’s collateral consequence is a different question.
When the dissent merges the two unrelated issues, it discounts the inherent speculative nature of particular collateral consequences, at least to the extent that it would declare that relief must inevitably relieve the applicant of the pleaded collateral consequence. Harrington itself offers an illustration. In that case, our analysis began with the general rule that “a person who files a habeas-corpus application for relief from a final felony conviction must challenge either the fact or length of confinement.”11 Harrington was not physically confined, so the question became whether Harrington could seek Article 11.07 relief. Because Harrington lost his job and was unable to find suitable employment as a result of the challenged conviction, the Court concluded that he demonstrated collateral consequences and the Court had jurisdiction to consider the merits of his application.12 The Court held that Harrington’s plea was involuntary, granted relief, and remanded the case to the trial court for resentencing.13 In granting relief, the Court said nothing about “releasing” Harrington from his past and current employment predicament, nor could it. Nor could the Harrington Court say with any confidence that granting relief would affect *734Harrington’s future employment prospects. We do not read Harrington, or any of our other precedents for that matter, to support the dissent’s position.
B.
Rhodes v. State was this Court’s seminal case applying the estoppel doctrine in barring certain claims.14 In that case, this Court held that “[a] defendant who has enjoyed the benefits of an agreed judgment prescribing a too-lenient punishment should not be permitted to collaterally attack that judgment on a later date on the basis of the illegal leniency.”15 The Rhodes Court highlighted two related variants of estoppel potentially applicable to collateral attacks on a conviction and sentence: es-toppel by judgment and estoppel by contract.16 The Court interpreted estoppel by judgment’s application as follows: “[0]ne who accepts the benefits of a judgment, decree, or judicial order is estopped to deny the validity of propriety thereof, or of any part thereof, on any grounds; nor can he reject its burdensome consequences.”17 The only exception to this principle, the Court explained, is for challenges to the subject-matter jurisdiction of the court rendering the judgment.18 Although Rhodes did not purport to apply estoppel by contract, it explained in dicta that es-toppel by contract operates similarly: “[A] party who accepts the benefit under a contract is estopped from questioning the contract’s existence, validity, or effect.”19
Based solely on the written plea agreement, Shay negotiated what appears to be a “favorable” plea agreement. In pleading guilty to the maximum sentence for the state-jail felony, he avoided indictment for possession of child pornography and aggravated sexual assault, offenses exposing him to a maximum of ten years’ confinement and a life sentence, respectively.20 However, in truth, we cannot know how favorable Shay’s agreement was; we cannot know the strength or weakness of the State’s case or the potential exculpatory or impeaching evidence Shay possessed. Despite how favorable the plea agreement appears to be on a cold record, estoppel does not bar Shay’s collateral attack on the conviction that results from that favorable negotiation.
We hold that the estoppel doctrines formulated and espoused by Rhodes are inapplicable to Shay’s request for relief under Thompson. When the statute supporting a charging instrument and judgment is rendered unconstitutional, the effect of that holding alters the balance of the equitable principles animating Rhodes’s formulation of estoppel—that a defendant should not accept the benefit of an agreement and the judgment it contemplates, only to challenge it later. Rhodes never contemplated a subsequent holding of unconstitutionality; it dealt with a statutorily too lenient punishment and easily identifiable “benefits” of a particular judgment. The equitable principles that applied fittingly in that context do not apply with equal force in this one.
In Smith v. State, decided a little over a year ago, the Court concluded that “an unconstitutional statute is void from its inception,” and that upon being declared *735unconstitutional, the statute “is as if it had never been.”21 After this Court delivered its Thompson opinion, there is no longer any law upon which to base Shay’s improper-photography conviction.22 So in light of Smith, Shay simply could not agree to a judgment convicting and sentencing him under a legally unenforceable statute.23 Nor could he “accept the benefits of the judgment of conviction in this case.”24 We need not weigh the Restatement (Second) of Contracts’ factors to come to the inevitable conclusion that Shay’s plea agreement is unenforceable on public-policy grounds. This is so because the executed contract between Shay and the State contemplated his confinement for violating a facially unconstitutional statute that contravenes the First Amendment25—undoubtedly one of the public’s most cherished liberties. Public policy would not permit a party to contract for his own confinement for violating a law retroactively considered to be no law at all.
Because Smith tells us that Shay’s statute under which he was convicted “is as if it never existed,” then, as Shay argues in his brief, the statute’s “non-existence” undermines the trial court’s subject-matter jurisdiction as well. Indeed, Smith’s logic lends support to Shay’s argument: If there is no law supporting Shay’s conviction, then there is no law over which the district court had subject-matter jurisdiction26 So even if Rhodes’s concept of es-toppel, in theory, bars claims for relief under case law invalidating a facial unconstitutional statute, the claim implicitly satisfies the subject-matter-jurisdiction exception Rhodes carved from estoppel by judgment’s general applicability.
III.
We hold that Shay is not barred by estoppel from seeking relief based on the subsequent invalidation of the statute under which he was convicted. Therefore, because the statute supporting Shay’s conviction is unconstitutional and is considered non-existent, we set aside Shay’s conviction and remand the cause to the trial court to dismiss the indictment.27
Keller, P.J., filed a dissenting opinion. Yeary, J., filed a dissenting opinion. Meyers, J., dissented.. 442 S.W.3d 325 (Tex. Crim. App. 2014).
. Id. at 349.
. Ex parte Shay, No. WR-84,007-01, 2015 WL 9243109 (Tex. Crim. App. Dec. 16, 2015) (not designated for publication).
. See Ex parte Harrington, 310 S.W.3d 452, 457 (Tex. Crim. App. 2010).
. Post, at 736 (Keller, P J., dissenting).
. Id. (citing Ex parte Jimenez, 361 S.W.3d 679, 683-84 (Tex. Crim. App. 2012)).
. Post, at 737 (Keller, P J., dissenting).
. TEX. CODE CRIM. PROC. art. 11.07, § 3(c).
. See Ex parte Harrington, 310 S.W.3d at 457 (holding that a showing of a collateral consequence, without more, sufficiently establishes confinement and triggers Article 11.07).
. Ex parte Harrington, 310 S.W.3d at 457. Accord Ex parte Renier, 734 S.W.2d 349, 353-54 (Tex. Crim. App. 1987) (dismissing "for want of jurisdictional requisites to granting relief, to wit: a final felony conviction and confinement”).
. Ex parte Harrington, 310 S,W.3d at 456 (citing Ex parte Lockett, 956 S.W.2d 41, 42 (Tex. Crim. App. 1997)).
. Id. at 457-58.
. Id. at 459-60.
. 240 S.W.3d 882, 889 (Tex. Crim. App. 2007).
. At at 892.
. Id. at 891.
. Id.
. Id.
. Id.
. See TEX. PENAL CODE §§ 22.021(e), 43.26(d) (West 2008).
. 463 S.W.3d 890, 895 (Tex. Crim. App. 2015) (citing Reyes v. State, 753 S.W.2d 382, 383 (Tex. Crim. App. 1988)) (internal quotations omitted).
. See id. at 895.
. Cf. Gutierrez v. State, 380 S.W.3d 167, 175-76 (Tex. Crim. App. 2012) (holding that a defendant could not "agree to submit to a condition of community supervision that the criminal justice system simply finds intolerable and which is therefore, by definition, not even an option available to the parties.”).
. See Rhodes, 240 S.W.3d at 891,
. Cf. Gutierrez, 380 S.W.3d at 177-78 (weighing Restatement (Second) of Contracts’ factors to conclude that Gutierrez’s deportation condition of her community supervision was unenforceable and that estoppel by contract did not apply).
. See Smith, 463 S.W.3d at 895. See also GEORGE E. DIX & JOHN M. SCHMOLE-SKY, 40 TEX. PRACTICE: CRIMINAL PRACTICE AND PROCEDURE § 4:13 (3d ed.) ("A statute creating a criminal offense that is constitutionally invalid deprives the court and any official acting on the basis of the invalid statute of the authority to act, including the subject-matter jurisdiction of the convicting court[.]”).
. See Ex parte Chance, 439 S.W.3d 918 (Tex. Crim. App. 2014).