
536 S.E.2d 916 (2002)
33 Va. App. 725
Tyric Javon WILLIAMS
v.
COMMONWEALTH of Virginia.
Record No. 0792-99-2.
Court of Appeals of Virginia, Richmond.
November 14, 2000.
*917 Anthony G. Spencer (Morchower, Luxton & Whaley, on briefs), Richmond, for appellant.
Marla Graff Decker, Assistant Attorney General (Mark L. Earley, Attorney General; Shelly R. James, Assistant Attorney General, on brief), for appellee.
BUMGARDNER, Judge.
Tyric Javon Williams, a juvenile, pleaded guilty to second degree murder. He contends the trial court lacked jurisdiction to convict him. Concluding the defendant waived the error he now asserts when he pled guilty, we affirm.
The defendant was charged with committing murder in the first degree on April 29, 1998. The juvenile and domestic relations district court found probable cause on July 16, 1998, and a grand jury indicted on August 10, 1998. In February 1999, the Commonwealth recognized the trial court would not have jurisdiction under the ruling in Baker v. Commonwealth, 28 Va.App. 306, 313, 504 S.E.2d 394, 398 (1998), because the defendant's father had not been notified of the preliminary hearing.
While the Baker case was pending before the Supreme Court,[1] the trial court remanded this case to the juvenile court. It gave the required notice, conducted a new preliminary hearing on February 26, 1999, and certified the case to the circuit court. The grand jury indicted on March 1, 1999, and a jury trial commenced on March 5, 1999. After the Commonwealth presented a part of its evidence, the defendant moved to change his plea. He unconditionally pled guilty to second degree murder pursuant to a plea agreement, agreed that he had thoroughly discussed the plea with his attorney, and acknowledged that he was waiving his right of appeal.
The defendant contends a violation of Code § 16.1-277.1[2] divested the trial court of jurisdiction to convict him. We conclude Code § 16.1-277.1 was inapplicable. The defendant *918 was 16 years old and charged with murder. Code § 16.1-269.1[3] limited the juvenile court to conducting a preliminary hearing and certifying the charge to the grand jury. Once the juvenile court found probable cause and certified the charge, it lost jurisdiction.
Code § 16.1-277.1 applies when the juvenile court has authority to adjudicate the matter or decide whether to transfer it for trial under adult procedures. The statute protects juveniles when held in secure detention,[4] and its remedy is limited to release from detention. In this case, the defendant was transferred to jail after his first preliminary hearing and was no longer held in juvenile detention. Code § 16.1-277.1 did not apply while he was in jail.
The indictment cured any error of which the defendant now complains that arose in the juvenile proceedings. "An indictment in the circuit court cures any error or defect in any proceeding held in the juvenile court except with respect to the juvenile's age." Code § 16.1-269.1(E). Moore v. Commonwealth, 259 Va. 405, 410, 527 S.E.2d 415, 418 (2000).
Further, the guilty plea waived any contention that the speedy trial provisions of Code § 19.2-243 were violated. Protections granted by Code § 19.2-243 may be waived. Stephens v. Commonwealth, 225 Va. 224, 230, 301 S.E.2d 22, 25 (1983); Brooks v. Peyton, 210 Va. 318, 321, 171 S.E.2d 243, 246 (1969); Butts v. Commonwealth, 145 Va. 800, 806, 133 S.E. 764, 766 (1926). A guilty plea waives all objections to non-jurisdictional defects that occurred before the plea. Terry v. Commonwealth, 30 Va.App. 192, 197, 516 S.E.2d 233, 235-36 (1999) (en banc) (violation of right to counsel claim waived by plea); Cardwell v. Commonwealth, 28 Va.App. 563, 566, 507 S.E.2d 625, 627 (1998) (double jeopardy claim barred by plea).
Accordingly, we affirm the conviction.
Affirmed.
NOTES
[1]  The Court affirmed the decision in Commonwealth v. Baker, 258 Va. 1, 516 S.E.2d 219 (1999).
[2]  Code § 16.1-277.1 provides, in relevant part:

A. When a child is held continuously in secure detention, he shall be released from confinement if there is no adjudicatory or transfer hearing conducted by the court for the matters upon which he was detained within twenty-one days from the date he was first detained.
B. If a child is not held in secure detention or is released from same after having been confined, an adjudicatory or transfer hearing on the matters charged in the petition or petitions issued against him shall be conducted within 120 days from the date the petition or petitions are filed.
(Emphasis added.)
[3]  Code § 16.1-269.1(B) provides, in part, that [t]he juvenile court shall conduct a preliminary hearing whenever a juvenile fourteen years of age or older is charged with murder...." Code § 16.1-269.1(D) provides that "[u]pon a finding of probable cause pursuant to a preliminary hearing under subsection B . . ., the juvenile court shall certify the charge, ..., to the grand jury. Such certification shall divest the juvenile court of jurisdiction...."
[4]  Juveniles are confined in "secure detention" "designed to prevent escape and to restrict the movement and activities of children held in lawful custody." Code § 16.1-228.
