
538 S.E.2d 333 (2000)
34 Va. App. 109
Charles Herman SHELTON, Jr.
v.
COMMONWEALTH of Virginia.
Record No. 2107-99-4.
Court of Appeals of Virginia, Alexandria.
December 19, 2000.
*334 J. Amy Dillard, Deputy Public Defender, for appellant.
Michael T. Judge, Assistant Attorney General (Mark L. Earley, Attorney General, on brief), for appellee.
Present: FITZPATRICK, C.J., and BENTON and ANNUNZIATA, JJ.
BENTON, Judge.
The trial judge convicted Charles Herman Shelton, Jr., of one count of carjacking. Shelton contends the trial judge erred by admitting into evidence a statement he made to police officers without the benefit of warnings required by Miranda v. Arizona, 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694 (1966). We affirm the conviction.

I.
A grand jury indicted Shelton for robbery, see Code § 18.2-58; Chappelle v. Commonwealth, 28 Va.App. 272, 274-75, 504 S.E.2d 378, 379 (1998), and carjacking, see Code § 18.2-58.1, of a taxi driver in Alexandria. At a hearing on Shelton's pretrial motion to suppress, the evidence proved that at 3:30 a.m. police officers in the District of Columbia joined in the search for a carjacking suspect, whom several City of Alexandria police officers had pursued into the District near a high school and a vocational school. An officer entered an alley with a police dog, announced that she would release her dog unless the person exited the alley, and released the dog when she neither heard nor saw anyone. The dog went from the alley to an adjacent yard, went under a car, arid pulled Shelton from under the car while holding Shelton's arm in his mouth. Although the officers had been informed that the suspect was armed, they found no gun on Shelton. They searched for the gun using another dog.
*335 Another officer put handcuffs on Shelton, walked him to the street, and questioned him about his identity in the presence of the Alexandria police officers. The Alexandria officers identified Shelton as the man they pursued into the District. After Shelton indicated he was "going to pass out," the officer allowed him to sit and continued to talk to him. The officer testified that Shelton had small lacerations on his head but was "very coherent." When the officer asked Shelton "where the gun was," Shelton responded, "I didn't have a gun when I took the cab," and then said "[h]e wanted to talk to a lawyer." The officer testified that he inquired about the gun because he "was concerned about it because it's a residential neighborhood and there's a school a block away and we needed to start to track and find the weapon so somebody else wouldn't find it and hurt themselves." He said he "wanted to make sure that a child wouldn't find the weapon."
Citing New York v. Quarles, 467 U.S. 649, 104 S.Ct. 2626, 81 L.Ed.2d 550 (1984), which recognized a narrow "`public safety' exception to the requirement that Miranda warnings be given before a suspect's answers may be admitted into evidence," id. at 655, 104 S.Ct. at 2631, the trial judge denied Shelton's motion to suppress the statement. As a part of his ruling, the trial judge also found that Shelton's statement was voluntary, that the police had not overborne his will, and that Shelton was aware of his Miranda rights because of prior encounters with the police.
On the day of trial, Shelton pled guilty to the charge of robbery. In so doing, he signed a written plea agreement waiving the right to object to the admissibility of any evidence against him on that charge. After the prosecutor proffered the facts supporting the robbery charge, including Shelton's identity as the robber, Shelton agreed to those facts. Before his trial on the carjacking charge, Shelton's counsel stated, "I would like before the trial starts [to] note my objection to [the trial judge's] decision [on the motion to suppress] and also point out that by that statement coming in [Shelton] essentially has no identity defense any longer and, as a result, has entered a plea which essentially stipulated to his identity and he won't challenge his identity at all. The reason that he's doing that is because of the ruling that [the] Judge handed down last Thursday."
At the bench trial on the carjacking charge, a taxi driver testified that at 3:00 a.m. on February 19, 1999, a man entered his taxi in Alexandria. The man put his arm around the driver's neck, said he had a gun, demanded the driver's money, and threatened to shoot the driver if he balked. As instructed by the robber, the driver put his money on top of the seat. The robber then ordered the driver out of the taxi and drove away. The driver testified that the robber wore a dark jacket with light stripes. The driver also testified that he did "not [get a] good look" at the robber and could not say Shelton was the robber. He further testified that he did not see a gun. Immediately after the driver exited the taxi, he called the police using his cellular telephone.
A police officer testified that about 3:17 a.m. he received a report of the incident, which described the taxi and indicated the robber was armed. Within seconds, he saw the taxi on the interstate highway heading north toward the District. The officer testified that only one man was in the taxi and that the man wore a dark jacket with tan or white stripes. When the officer activated his emergency lights and siren, the taxi accelerated and continued to the District.
In the District, while being pursued by both District and Alexandria police, the man stopped the taxi. The Alexandria officer exited his car as the man exited the taxi. They stared at each other "for a second" before the man ran. The officer identified Shelton as the man who exited the taxi and testified that he chased Shelton until he disappeared. Fifteen minutes later, a District police officer appeared with Shelton in handcuffs. The officer testified that later, when the District officer asked Shelton where the gun was, Shelton responded, "I didn't have a gun when I took the cab."
The District officer, who handcuffed Shelton after the dog pulled him from under the car, testified that when he was walking Shelton from the yard to the street, Shelton was trembling and "said that he was about to *336 pass out." The officer put Shelton on the ground to sit. As he began to question Shelton about his identity, he heard another officer yell, "Where is the gun?" The District officer who had custody of Shelton then asked Shelton "where the gun was." The officer testified that Shelton was apprehended in a residential neighborhood in the vicinity of a school.
Shelton testified in his defense and admitted he robbed the driver. He testified, however, that he "didn't have any kind of weapon whatsoever. No knives, no guns nothing." He testified that he forcefully demanded the driver's money but without making any threats, that the driver dropped the money on the floor of the taxi and ran, and that he then drove away in the driver's taxi.
The trial judge convicted Shelton of carjacking. He sentenced Shelton to fifteen years in prison and suspended ten years of that sentence. On Shelton's guilty plea to robbery, the trial judge sentenced him to five years in prison, suspending two years and ordering the sentence to be served consecutive to the carjacking sentence.

II.
Shelton contends that his statement, "I didn't have a gun when I took the cab," was obtained in violation of Miranda and that, consequently, it was improperly used at trial to prove his identity. The Commonwealth counters that, by pleading guilty to the robbery indictment, Shelton waived any objection he might have had to the admissibility of the statement, that Shelton's statement was admissible pursuant to Quarles, and that if error was committed it was harmless.
Shelton's notice of appeal specifies an appeal from both the robbery and carjacking convictions. Shelton's counsel agreed at oral argument, however, that this appeal concerns only the conviction for carjacking pursuant to Code § 18.2-58.1. Indeed, we note that the record does riot reflect that Shelton's guilty plea to the robbery indictment was a conditional plea. See Code § 19.2-254 (providing in part that "[w]ith the approval of the court and the consent of the Commonwealth, a defendant, may enter a conditional plea of guilty in a felony case, reserving the right, on appeal from the judgment, to a review of the adverse determination of any specified pretrial motion"). Thus, this is not the case where, "[p]ursuant to Code § 19.2-254, [Shelton] reserved [his] right to appeal that portion of the . . . judgment denying [his] motion to suppress." Polston v. Commonwealth, 255 Va. 500, 501, 498 S.E.2d 924, 924 (1998). The plea agreement preserves no objections to the admission of the statement, and the guilty plea to the robbery indictment was not conditioned upon an unsuccessful appeal of the motion to suppress.
"Where a conviction is rendered upon... a [guilty] plea and the punishment fixed by law is in fact imposed in a proceeding free of jurisdictional defect, there is nothing to appeal." Peyton v. King, 210 Va. 194, 196-97, 169 S.E.2d 569, 571 (1969). See also McMann v. Richardson, 397 U.S. 759, 768-71, 90 S.Ct. 1441, 1447-49, 25 L.Ed.2d 763 (1970) (holding that a competently counseled accused who alleges that he unconditionally pleaded guilty because of a prior coerced confession fails to raise a valid claim that his guilty plea was not voluntary or intelligently made). Therefore, the robbery conviction is not properly before us. Moreover, this appeal raises no issue concerning the robbery guilty plea because it was not placed in issue at the carjacking trial.

III.
The following principles guide our analysis of this case:
When police ask questions of a suspect in custody without administering the required warnings, Miranda dictates that the answers received be presumed compelled and that they be excluded from evidence at trial in the State's case in chief. The [Supreme] Court has carefully adhered to this principle, permitting a narrow exception only where pressing public safety concerns demanded.
Oregon v. Elstad, 470 U.S. 298, 317, 105 S.Ct. 1285, 1297, 84 L.Ed.2d 222 (1985) (citing Quarles, 467 U.S. at 655-56, 104 S.Ct. at 2631-32). For purposes of Miranda, "the ultimate inquiry is simply whether there is a *337 `formal arrest or restraint on freedom of movement' of the degree associated with a formal arrest." California v. Beheler, 463 U.S. 1121, 1125, 103 S.Ct. 3517, 3520, 77 L.Ed.2d 1275 (1983) (per curiam) (citation omitted).
The evidence establishes that Shelton was in custody after he fled from the police and was detained in the District of Columbia. He was initially detained by the police at gunpoint and placed in handcuffs. Several police officers surrounded him after they had chased him because he was a suspect in a criminal offense. These facts are sufficient to bring this case within the general scope of Miranda.
In Quarles, a woman reported to a police officer that a man with a gun had raped her and entered a grocery store. In the store, the officer saw a man matching the description of the suspect and handcuffed him. After a frisk search revealed no gun, the officer asked him where the gun was located. The man nodded toward some empty cartons and responded, "the gun is over there." 467 U.S. at 652, 104 S.Ct. at 2629. The Supreme Court held that "there is a `public safety' exception to the requirement that Miranda warnings be given before a suspect's answers may be admitted into evidence, and . . . the availability of that exception does not depend upon the motivation of the individual officers involved." Id. at 655-66, 104 S.Ct. at 2631. This exception is established when the evidence proves "an objectively reasonable need to protect the police or the public from any immediate danger associated with [a] weapon." Id. at 659 n. 8, 104 S.Ct. at 2633 n. 8. Applying that exception, the Court ruled that neither the gun nor the statement needed to be suppressed. Id. at 659, 104 S.Ct. at 2633.
In denying Shelton's motion to suppress, the trial judge found that the facts were sufficient to prove the Quarles exception. The trial judge's finding "that a threat to public safety temporarily suspends the obligation to give Miranda warnings ... is a mixed question of fact and law that implicates constitutional rights [and] is subject to de novo review." United States v. Brady, 819 F.2d 884, 886 (9th Cir.1987). Moreover, in our review of the trial judge's ruling on the motion to suppress "we must examine the records of both the suppression hearing and the trial to determine whether the evidence was [properly admitted]." Brown v. Commonwealth, 33 Va.App. 296, 306, 533 S.E.2d 4, 8 (2000).
The evidence proved that when the officer asked Shelton where the gun was located, the officer had been told the suspect was armed. The officer also knew Shelton had fled in the taxi and later hid under a car in a residential neighborhood in the vicinity of two schools. The officer frisked Shelton and found no gun. When the officer who was obtaining identifying information from Shelton asked about the gun, other officers were using a police dog, trained in detection of weapons, to search for it. These circumstances do not suggest that the officer asked the question to elicit testimonial evidence. Rather, these circumstances establish "an objectively reasonable need to protect . . . the public from any immediate danger." Quarles, 467 U.S. at 659 n. 8, 104 S.Ct. at 2633 n. 8.
The potential presence of a discarded gun in a residential neighborhood near a school is an immediate threat to public safety. The circumstances posed the risk that a resident of the neighborhood or a school child "might later come upon [the gun]." Id. at 657, 104 S.Ct. at 2632. As in Quarles, "[t]he police in this case, in the very act of apprehending a suspect, were confronted with the immediate necessity of ascertaining the whereabouts of a gun which they had every reason to believe the suspect had just... discarded." Id. at 657, 104 S.Ct. at 2632. The evidence, thus, proved that this was "a situation in which police officers ask[ed] questions reasonably prompted by a concern for the public safety." Id. at 656, 104 S.Ct. at 2632. Accordingly, we hold that the facts established the narrow exception to the Miranda requirements.
Shelton also contends the evidence proved actual coercion from police misconduct. In Quarles, the Court implied that a statement otherwise coming within the "public safety" exception will be excluded if it is actually coerced. See U.S. at 658 n. 7, 104 S.Ct. at 2632 n. 7 (stating that "absent actual coercion by the officer, there is no *338 constitutional imperative requiring the exclusion of the evidence"). Citing United States v. Rullo, 748 F.Supp. 36 (D.Mass.1990), Shelton argues that his statements were involuntary and the product of physical abuse by the police.
In Rullo, the evidence proved that the police were pursuing Rullo from the site of a drug transaction when they suspected he shot at them. 748 F.Supp. at 38. When ten officers apprehended Rullo, he submitted to the detention. Nonetheless, the officers "punched and kicked ... Land] cursed at him." Id. at 39. During the beatings, the officers said, "Give us the gun and we'll let you up." M. Suppressing Rullo's statement identifying the location of the gun, the trial judge found that Rullo's will was overborne by the coercive police misconduct. Id. at 41-42.
In this case, however, no evidence proved police misconduct in apprehending or questioning Shelton. It did prove that after Shelton abandoned the taxi at 3:30 a.m. and fled, he secreted himself in the yard of a residence. An officer shouted for Shelton to come from his hiding place and received no response. The officer then released her police dog, which located Shelton under a car. When Shelton refused to leave, the dog bit him in the process of detaining him and dragged him by his arm from under the car. These circumstances do not establish unwarranted force or misconduct by the police. Shelton was injured when the dog located him after he refused to reveal himself in the darkness. The capture by the dog was a reasonable response to Shelton's refusal to reveal himself in the darkness.
Once the dog pulled Shelton from under the car, the police exerted no unlawful coercion upon him. Shelton was removed from the yard to the nearby street and seated on the ground. The evidence proved no overbearing conduct or coercion during the questioning.
For these reasons, we affirm the conviction.
Affirmed.
