
494 S.E.2d 892 (1998)
26 Va. App. 403
Michael Richard HOLDEN
v.
COMMONWEALTH of Virginia.
Record No. 0803-97-4.
Court of Appeals of Virginia, Alexandria.
January 27, 1998.
*893 Elwood Earl Sanders, Jr., Director Capital/ Appellate Services, Woodbridge, (Public Defender Commission, on briefs), for appellant.
John H. McLees, Jr., Assistant Attorney General (Richard Cullen, Attorney General; Kathleen B. Martin, Assistant Attorney General, on brief), for appellee.
Present: WILLIS, ANNUNZIATA and BUMGARDNER, JJ.
WILLIS, Judge.
On appeal from his convictions for aggravated sexual battery of children under the age of thirteen, Michael Richard Holden contends (1) that the trial court lacked jurisdiction to convict him, and (2) that the trial court erred in finding that his possession, creation and dissemination of obscene material violated a condition of his plea agreement. We disagree and affirm the judgment of the trial court.

I.
On August 11, 1986, a grand jury indicted Holden on two counts of forcible sodomy and seven counts of aggravated sexual battery of children under the age of thirteen. Holden entered into a plea agreement, whereby he pled guilty to four counts of aggravated sexual battery. The agreement provided that the trial court would impose sentence on two counts and would withhold decision on the other two counts on such terms as the trial court imposed.
The trial court accepted the plea agreement. On May 13, 1987, it sentenced Holden to serve ten years in prison on each of two counts of aggravated sexual battery. On the other two counts, the trial court withheld decision "for a period of ten years following the defendant's release from confinement" upon condition that:
*894 1. The defendant shall keep the peace, be of good behavior, and obey all laws of this or any other jurisdiction.
2. The defendant shall serve 10 years on supervised probation following his release from confinement under the standard terms and conditions of probation.
On July 24, 1996, the trial court issued a rule against Holden to show cause why he should not be held in violation of the terms of the May 13, 1987 order. Testimony disclosed that prison officials had seized from Holden letters in which he explicitly advocated and described a design to engage in sexual abuse of children.
On December 17, 1996, the trial court ruled that Holden's misconduct violated the May 13, 1987 order that he "be of good behavior." The trial court convicted him of the two counts as to which decision had been withheld.

II. JURISDICTION


A.
Holden contends first that the trial court lacked jurisdiction to convict him on the two counts of aggravated sexual battery as to which decision had been withheld. He argues that by deferring judgment on his guilty pleas, the trial court divested itself of jurisdiction over those charges.
Subject matter jurisdiction is the authority granted a court to adjudicate a class of cases or controversies. Morrison v. Bestler, 239 Va. 166, 169, 387 S.E.2d 753, 755 (1990). Subject matter jurisdiction "cannot be waived or conferred on the court by agreement of the parties." Id. at 169-70, 387 S.E.2d at 755 (citation omitted). "A judgment on the merits made without subject matter jurisdiction is null and void." Id. at 170, 387 S.E.2d at 755-56 (citation omitted). Therefore, "the lack of subject matter jurisdiction can be raised at any time in the proceedings, even for the first time on appeal by the court sua sponte." Id. at 170, 387 S.E.2d at 756.
In Morrison, the Supreme Court said:
One consequence of the non-waivable nature of the requirement of subject matter jurisdiction is that attempts are sometimes made to mischaracterize other serious procedural errors as defects in subject matter jurisdiction to gain an opportunity for review of matters not otherwise preserved.
239 Va. at 170, 387 S.E.2d at 756. In Commonwealth v. Smith, 230 Va. 354, 337 S.E.2d 278 (1985), the Supreme Court held that failure to comply with a procedural requirement that a post-conviction bond appeal be decided by a three-judge panel rather than by a single judge did not divest this Court of jurisdiction. Id. at 360-61, 337 S.E.2d at 281-82.
Generally, absent an express statutory grant, trial courts may not dismiss criminal charges on grounds other than the legal or factual merits. Noting this, Holden mischaracterizes the trial court's acceptance of the plea agreement and its deferment of judgment on two of the guilty pleas as a divestiture of jurisdiction. Holden cites no authority for this position, and we have found none. He argues only that the trial court was required to proceed expeditiously to disposition on his guilty pleas and that its failure to do so was a denial of due process. However, although error, even constitutional error, may produce a reversible decision, it does not extinguish jurisdiction.
Deferment of judgment or imposition of sentence may impose practical difficulties. However, this practice is authorized. See Code §§ 19.2-298, 19.2-303. The trial court discharged its duties properly in this case. It neither refused to try the case nor set the case aside permanently. Rather, it exercised its discretion soundly in accepting and implementing the plea agreement proposed by the Commonwealth and Holden. See Rule 3A:8(c). The terms of the plea agreement sought Holden's rehabilitation, a socially and legally desirable goal.
Acceptance of Holden's plea agreement did not divest the trial court of its jurisdiction to adjudicate the charges. The legislature has granted subject matter jurisdiction to the circuit courts for all felonies and for "all presentments, indictments and informations." Code §§ 17-123, 19.2-239. See Owusu v. *895 Commonwealth, 11 Va.App. 671, 672-73, 401 S.E.2d 431, 431 (1991). The trial court acquired jurisdiction when the indictments were returned and it proceeded according to the plea agreement. No action or omission by the trial court relinquished or extinguished its subject matter jurisdiction.
A contrary result would deem jurisdictional a mere procedural deviation, resulting in the unwarranted nullification of consent judgments. Cf. Manns v. Commonwealth, 13 Va.App. 677, 679-80, 414 S.E.2d 613, 615 (1992) (criminal defendant may not both approbate and reprobate).
Because the trial court had jurisdiction to convict Holden, we need not consider his argument, raised for the first time on appeal, that the trial court committed reversible error by deferring judgment on the pending charges. See Rule 5A:18.

B.
Holden contends also that the trial court lacked jurisdiction to make a finding of guilt based upon his conduct in prison. He argues for the first time on appeal that the term of his good behavior did not commence until his release from prison, and, therefore, because he was still in prison at the time of his misconduct, that misconduct could not be a violation of the order.
As we have noted, the trial court had jurisdiction to enter judgment. At the time that Holden misbehaved, the cases were pending, awaiting decision by the trial court under the terms of the plea agreement. By the express language of the order, the continued deferment of the proceedings was contingent upon Holden's good behavior. Accordingly, the trial court retained jurisdiction over the pending cases at the time of the misconduct. Cf. Coffey v. Commonwealth, 209 Va. 760, 167 S.E.2d 343 (1969).

III. GOOD BEHAVIOR

Holden contends that the trial court erred in ruling that he violated the trial court's order that he be of good behavior. He argues that the First Amendment shields him from punishment for the possession, creation and dissemination of documents which advocate, in sexually explicit terms, illegal sexual relations with children.
The First and Fourteenth Amendments to the Constitution of the United States forbid abridging freedom of speech. Similarly, the Constitution of Virginia provides:
That the freedoms of speech and of the press are among the great bulwarks of liberty, and can never be restrained except by despotic governments; that any citizen may freely speak, write, and publish his sentiments on all subjects, being responsible for the abuse of that right....

Art. I, § 12 (emphasis added). However, obscenity enjoys no constitutional protection, Goldstein v. Commonwealth, 200 Va. 25, 27, 104 S.E.2d 66, 67 (1958), and the value of child pornography has been characterized as "`exceedingly modest, if not de minimis.'" Osborne v. Ohio, 495 U.S. 103, 108, 110 S.Ct. 1691, 1695, 109 L.Ed.2d 98 (1990) (quotation omitted). See Code § 18.2-372 (defining "obscene").
Good behavior is not limited to an avoidance of criminal activity.
Probation is a disposition intended to reform the offender, appropriate in mitigating circumstances or to promote the public interest. It provides an opportunity for an accused to repent and reform, which may be withdrawn for reasonable cause, determined in the sound discretion of the trial court. Therefore, the issue on review of a revocation is simply whether there has been an abuse of discretion.
Connelly v. Commonwealth, 14 Va.App. 888, 890, 420 S.E.2d 244, 245 (1992) (citations omitted) (emphasis in original) (internal quotation marks omitted). See Hamilton v. Commonwealth, 217 Va. 325, 327, 228 S.E.2d 555, 556 (1976).
Holden demonstrated a predilection to continue the misconduct that had led to his convictions for aggravated sexual battery of children under the age of thirteen. He revealed a cultivation of that predilection so as to create an expectation that he would be discharged from prison unrehabilitated and would resume his crimes against children. His misconduct frustrated efforts to rehabilitate *896 him and enhanced the likelihood that he would continue to be a threat to children and to public order and safety. His creation, possession, and dissemination of the subject obscene material perpetuated the very conduct embraced by the charges for which disposition had been deferred.
Accordingly, we find no abuse of discretion in the trial court's decision to terminate the deferment of judgment. The judgment of the trial court is affirmed.
Affirmed.
