
    Ruben Pena SAUCEDO, Appellant, v. The STATE of Texas, Appellee.
    No. C14-89-01074-CR.
    Court of Appeals of Texas, Houston (14th Dist.).
    July 12, 1990.
    Ruben Saucedo, Huntsville, for appellant.
    J. Harvey Hudson, Houston, for appellee.
    Before PAUL PRESSLER, CANNON and ELLIS, JJ.
   OPINION

ELLIS, Justice.

This is an appeal from a judgment on appellant’s application for writ of habeas corpus, challenging appellant’s pre-trial restraint. Because this court lacks jurisdiction, we order the appeal dismissed.

Appellant filed a petition for writ of ha-beas corpus on September 27, 1989, in which he contested the legality of his detention in the Harris County Jail, contending that his Due Process rights were violated by his pre-trial detention. On November 17, 1989, after hearing on appellant’s petition, the trial court, apparently interpreting appellant’s application as only a request for setting of a bond, “granted” the writ and set bond in the amount of $50,000. The same date appellant filed notice of appeal.

On February 5, 1990, appellant entered a plea of guilty pursuant to a plea bargain to the underlying criminal charge in Cause No. 587,033 in the 338th District Court of Harris County. Punishment was assessed by the trial court, pursuant to the plea bargain, at imprisonment for five years.

On appeal of the trial court action on his application for writ of habeas corpus, appellant contends that the trial court erred in failing to consider the constitutional issues raised by his application; in failing to provide adequate assistance of counsel in defending against the underlying criminal appeal; and in failing to appoint counsel to represent appellant on this appeal.

We find that the issues regarding appellant’s pre-trial restraint have been rendered moot by entry of his plea of guilty to the underlying criminal offense. Habeas corpus is by definition an extraordinary writ in which the restraint of one’s liberty is challenged as illegal. Tex.Code CRIm.PROC.Ann. articles 11.14 and 11.40. Once the return of the writ has been made, and the applicant has been brought before the court, he is no longer detained on the original warrant or process, but under authority of the habeas corpus. Tex.Code Crim.Proc.Ann. art. 11.32.

In the instant cause, the return of the writ was made and appellant was brought before the trial court. After hearing, the trial court set bail. Thereafter, he entered a plea of guilty to the underlying offense. Appellant’s application for writ of habeas corpus entailed a challenge to the legality of his original confinement. Appellant is no longer confined based on the process underlying his original detention, but is now confined pursuant to judgment and sentence in Cause No. 537,033. Where the premise of a habeas corpus application is destroyed by subsequent developments, the legal issues raised thereunder are rendered moot. See Ex parte Branch, 553 S.W.2d 380 (Tex.Crim.App.1977); Ex parte Norvell, 528 S.W.2d 129 (Tex.Crim.App.1975); Ex parte Marks, 165 S.W.2d 184 (Tex.Crim.App.1942). Appellant raises several issues which may be suitable for consideration on appeal of his conviction. It has long been held, however, that habeas corpus will not lie as a substitute for an appeal. Ex parte Hopkins, 610 S.W.2d 479, 480 (Tex.Crim.App.1980). Though the rule is not absolute, it will be followed unless good cause is shown to deviate from it. Id. Since habeas corpus is an extraordinary remedy, ordinarily an application for writ of habeas corpus should not be entertained where there is an adequate remedy at law. Ex parte Groves, 571 S.W.2d 888, 890 (Tex.Crim.App.1978). We see no reason to deviate from this rule in the present instance. Appellant has an adequate remedy at law in that his contentions may be raised on direct appeal of his conviction.

In his third point of error, appellant contends the trial court erred in failing to appoint counsel to represent him on this appeal. As appellant correctly points out, there is no right to appointment of counsel for the prosecution of a habeas corpus attack under the circumstances presented here. See Hernandez v. State, 530 S.W.2d 563, 567 (Tex.Crim.App.1975). Since the questions under his first two points of error may be raised on direct appeal, at which time appellant, if eligible, will be entitled to appointed counsel, we perceive no reason why Due Process would require counsel to be appointed for the purposes of this appeal. Moreover, we note there is no record this issue was ever presented to the trial court, and, thus, no error has been preserved. Tex.R.App.P. 52.

Finding that the issues raised by appellant’s pre-trial application for writ of habe-as corpus have been rendered moot by his subsequent plea of guilty and conviction, we hold that any determination we might make on the merits would be advisory only. See Sims v. State, 792 S.W.2d 81, 82 (Tex.Crim.App.1990). Because this court lacks jurisdiction, we order the appeal dismissed.  