
871 P.2d 359 (1994)
SHERIFF, CLARK COUNTY, Appellant,
v.
Sharon Kay ROYLANCE, Respondent.
No. 23865.
Supreme Court of Nevada.
March 30, 1994.
*360 Frankie Sue Del Papa, Atty. Gen., Carson City, Rex Bell, Dist. Atty., Clark County, for appellant.
Peter L. Flangas, Las Vegas, for respondent.

OPINION
STEFFEN, Justice:
This is an appeal from an order of the district court granting respondent's pretrial petition for a writ of habeas corpus.
Respondent Sharon Kay Roylance was indicted for allegedly selling a total of approximately 25 grams of cocaine to an undercover police officer in five separate transactions between July 5, 1991, and September 5, 1991. On February 13, 1992, Roylance appeared before the justice's court for the preliminary hearing. The state informed the justice's court that it was unable to proceed because its sole witness, the undercover officer, was ill. The prosecuting attorney represented that he had been informed of the officer's illness by a bailiff, who had spoken to the officer. Over Roylance's objection, the justice of the peace continued the preliminary hearing until April 14, 1992. The justice of the peace stated that Roylance could challenge the validity of the officer's alleged illness at the continued preliminary hearing. The continued preliminary hearing was never held, however, because the state elected to present the case to the grand jury on February 27, 1992. The undercover officer testified before the grand jury.
At the grand jury proceeding, the officer testified that the first alleged transaction started at a Las Vegas bar where the officer gave Roylance $225.00 for an eighth of an ounce of cocaine. Roylance departed the bar and returned shortly thereafter. Roylance and the officer then got in Roylance's vehicle and completed the transaction while driving around the block.
The second alleged transaction started at the same bar. The officer gave Roylance $450.00 for a quarter ounce of cocaine and Roylance arranged to meet the officer outside another bar in fifteen to twenty minutes. The transaction was again completed in Roylance's vehicle.
The third alleged transaction started at a house which Roylance was listing for sale. The officer apparently contacted Roylance and told her that he wanted a quarter ounce of cocaine. They agreed on a price of $425.00. The officer gave Roylance the money at the house and Roylance told the officer that they should both depart and return shortly. Upon returning, they reentered the house and Roylance gave the officer the cocaine.
The fourth alleged transaction occurred at an establishment called Ole's. Roylance and the officer arranged to meet at Ole's so that the officer could purchase a quarter ounce of cocaine. Roylance saw the officer arrive and approached the officer's car window. The officer gave Roylance $425.00 and Roylance told the officer to meet her at a bank in 20 to 25 minutes, where they concluded the transaction.
The fifth alleged transaction occurred at a street intersection. Roylance contacted the officer and told him that she had a sample of the best cocaine she ever had. Roylance and the officer met at the intersection and Roylance allegedly told the officer that she had a new steady source of excellent powder cocaine. The officer paid Roylance $80.00 for one gram of cocaine.
The grand jury returned a true bill against Roylance, and an indictment was filed the next day. The indictment charged Roylance with two counts of sale of a controlled substance and three counts of trafficking in a controlled substance.
Roylance petitioned the district court for a pretrial writ of habeas corpus on two grounds: (1) that she was a procuring agent, not a seller or trafficker, as a matter of law; and (2) that the state displayed a conscious indifference to her important procedural rights when it put the case to the grand jury after being warned by the justice's court that it would have to justify the continuance of the preliminary hearing. The district court *361 heard argument and held an evidentiary hearing regarding the propriety of the justice's court's continuance.
At the evidentiary hearing, the undercover officer again failed to appear and the state was unable to produce any evidence, such as work or medical records, that the officer was ill on the day in question. The prosecution represented that it had subpoenaed the officer and did not know why he was not present at the evidentiary hearing. The district court granted Roylance's petition for a writ of habeas corpus on both the procuring agent and the conscious indifference grounds. We conclude that the district court erred.

CONSCIOUS INDIFFERENCE
A pretrial writ of habeas corpus may issue when a district attorney acts in a willful or consciously indifferent manner with regard to a defendant's procedural rights. See Sheriff, Nye County v. Davis, 106 Nev. 145, 787 P.2d 1241 (1990). Good cause must be shown by the prosecution for securing a continuance of a preliminary examination. Id. We have held that good cause exists when a prosecutor is genuinely surprised by the absence of a subpoenaed witness at a preliminary hearing, orally moves for a continuance, and testifies under oath to the factual matters supporting the motion for a continuance. See Bustos v. Sheriff, 87 Nev. 622, 491 P.2d 1279 (1971). This court, however, will not disturb a decision of the district court that the prosecution exhibited conscious indifference to a defendant's important procedural rights if there is substantial evidence in the record to support the district court's determination. See State v. Autry, 103 Nev. 552, 746 P.2d 637 (1987); see generally Sheriff, Nye County v. Davis, 106 Nev. 145, 787 P.2d 1241 (1990); Sheriff v. Menendez, 98 Nev. 430, 651 P.2d 98 (1982); McNair v. Sheriff, 89 Nev. 434, 514 P.2d 1175 (1973). Nevertheless, we conclude that there is not substantial evidence in the record to support the district court's decision.
When the subpoenaed undercover officer failed to appear, the prosecutor complied with Bustos and testified that the bailiff told him that the officer had called to say that he was ill and asked for a continuance. What occurred at the second hearing and whether the officer was truly ill are irrelevant. The only question properly before the district court was whether the prosecution was consciously indifferent to Roylance's important procedural rights when it requested the original continuance in justice's court. There is nothing in the record to suggest that the prosecution was not genuinely surprised by the undercover officer's original absence at the preliminary hearing. Absent evidence indicating that the prosecution was consciously indifferent to securing the officer's presence so that the preliminary hearing could occur, the justice's court properly granted the continuance.

PROCURING AGENT
The district court may grant pretrial writs of habeas corpus where a defendant has been committed or indicted on a criminal charge without probable cause. NRS 34.500(7). The district court, however, did not determine that there was insufficient cause to bind over Roylance on the sale or trafficking charges. Rather, the district court determined that the grand jury evidence proved Roylance was a procuring agent as a matter of law, i.e. the evidence could only support the conclusion that Roylance was merely a procuring agent and not a seller or trafficker.
A district court may grant a pretrial writ of habeas corpus upon a determination that an affirmative defense exists as a matter of law based solely on its review of the transcript of a preliminary hearing where "clear, uncontroverted evidence exists in the record which establishes the defense. . . ." Sheriff v. Gleave, 104 Nev. 496, 498, 761 P.2d 416, 417-18 (1988). A procuring agent is a person who acts, not on one's own behalf or for a supplier, but solely for the recipient. A procuring agent cannot be guilty of selling or trafficking in a controlled substance. See Hillis v. State, 103 Nev. 531, 746 P.2d 1092 (1987); Roy v. State, 87 Nev. 517, 489 P.2d 1158 (1971).
We conclude that the district court erred in determining that Roylance was a procuring agent as a matter of law. Although the state may not have negated the *362 procuring agent defense, the record does not contain clear, uncontroverted evidence establishing the defense. The officer, who was the sole witness, did not testify as to Roylance's motives. The record is unclear as to the reason Roylance was providing cocaine to the undercover officer. It might have been out of friendship, or it might have been to make a profit. The officer did not establish through his testimony that Roylance was "merely a conduit for the purchaser and in no way benefitted from the transaction." Dixon v. State, 94 Nev. 662, 664, 584 P.2d 693, 694 (1978). Accordingly, we reverse the order of the district court issuing the writ of habeas corpus and remand for further proceedings.
ROSE, C.J., and SHEARING, J., concur.
YOUNG and SPRINGER, JJ., dissented.
YOUNG, Justice, with whom SPRINGER, Justice, joins, dissenting:
I respectfully dissent from the majority's conclusion that the State did not act in a consciously indifferent manner toward Roylance's procedural rights. In my opinion, there is sufficient evidence in the record for this court to defer to the fact-finding of the district court.
The record indicates that Roylance objected to a continuance of the preliminary hearing due to the officer's illness. Roylance was told she would have the opportunity to challenge the continuance at the next hearing. However, that hearing never took place because the State chose to put the case to the grand jury. Consequently, Roylance never had the opportunity to challenge the continuance as promised. For this reason, I disagree with the majority that what occurred at the second hearing was irrelevant. The second hearing was Roylance's first opportunity to challenge the State's actions, and in that sense was a continuation of the first hearing despite the fact that an indictment had already been obtained. However, at this second hearing, the State failed to fully justify its actions in the first hearing. The district court judge properly took this into account, as well as the fact that the officer failed to show up a second time. Indeed, the State did not provide an affidavit from the absent officer as to his illness during the first hearing until it submitted a motion for rehearing after the writ of habeas corpus was granted. In my opinion, the totality of the circumstances indicates conscious indifference on the part of the State.
In addition, I question the sufficiency of the evidence proffered by the State at the first hearing as reason for the continuance. The evidence consisted of the prosecutor hearing from the bailiff who heard from the officer that the officer was sick and unable to attend. This was clearly hearsay. It is doubtful that this evidence alone was sufficient evidence to establish good cause required to justify a continuance. Therefore, Roylance had every right to challenge the propriety of the continuance at a second hearing.
Because I conclude that the record contains sufficient evidence to find that the State behaved in a consciously indifferent manner towards Roylance's procedural rights, I would affirm the decision of the district court.
