Moore, J.
The fact is patent that Wyatt and wife purchased the property from Phillips and wife, subject to the debt charged *245upon it by the mortgage to Lewis. The lot was thus encumbered with their consent, and by an agreement and understanding between all parties that it should be done, that the proposed exchange of lots might be consummated. Until the debt to Lewis was discharged, Wyatt and wife were, at most, entitled merely to the equity of redemption of the lot. (Dunlap v. Wright, 11 Tex., 597.) The debt was created with reference to the agreed manner in which it should be secured, and must be regarded, as in truth, a part of the purchase money which Wyatt and wife were to pay for the lot. And although they purchased the lot for a homestead, and occupied it as such, yet they did so, knowing the fact that it was charged with an encumbrance, which gave a superior right to their homestead privilege, and that this could not attach to the lot until this encumbrance was discharged. Has the mortgage debt been paid ? If not, it is evident that the plaintiffs were entitled to a judgment, unless they failed to show that it was due to them, or if they were entitled to the debt, the security for its payment in favor of Lewis, the original payor, did not enure to them; or there was such error or defect in the maimer in which the plaintiffs were seeking to enforce their rights, as required the court, on hearing the case, to enter judgment against them.
Has the debt secured by the mortgage to Lewis been discharged ? The appellees insist that it has. If so, it is evident that it has not been paid by Wyatt and wife, or by the property upon which, by their express agreement, it was charged; and which evidently was to be the primary fund, from which payment of it was to be looked, if, in any event, Phillips and wife were to be liable for it. Can the appellees insist that the debt was paid by the illegal and void sale of the mortgage property ? We think not. This court, in the case between the parties in which the present appellants were seeking to establish a title as purchasers under this mortgage sale, say : “ But after his (Wyatt’s) death, the power being thereby revoked, the sale by the trustee was unauthorized, and, consequently, inoperative to foreclose the equity of redemption remaining in his legal representatives; was not binding upon his estate, or effectual to give title to the purchaser at the sale.” Shall it be said, that although the sale was inoperative to pass the title *246of the mortgaged property, yet it was effectual to extinguish the mortgage debt; it was void as to Wyatt’s estate, but valid as to the purchaser ? Such a suggestion is too glaringly inconsistent, as well as repugnant to every principle of equity and good conscience to be entitled to a moment’s credence. The attempt to sell the lot by Lewis, the trustee, was without authority; his deed to the purchasers vested no title in them. For aught that appears in the present record, they might, if Lewis had refused to refund their money, have compelled him to do so. That he and Phillips and wife should have voluntarily consented to do so; or in lieu of an actual restoration of the money paid by the appellants, should have subrogated them to the rights of Lewis, in the note and mortgage, is not a matter of which appellees can complain. The lot was still chargeable with the debt; the lien upon it was not extinguished, and equity required, if necessary, that justice, might be done all parties, that the note, although lost or destroyed, and the mortgage should be recognized as a subsisting and valid charge upon the lot. It is a familiar maxim, that equity will hold that as having .been done which should have been done; and it is equally true, that in proper cases calling for its application, the converse of this proposition is as well established, and will hold that which should have not been done as being still unperformed. „
It is a matter of no importance whether the note was in actual existence or not, or whether it was still susceptible of assignment as negotiable paper. The facts show that the debt evidenced by it was unpaid, and that Phillips and wife and Lewis had, for an adequate consideration, passed it to the appellants, together with the lien, for its security, as far as they could do so. And having been duly authenticated and presented to the administrator, (if, indeed, that were necessary,) and rejected by him, appellants were authorized to bring suit to establish and enforce it; and as the proceeding was for the purpose of subjecting the homestead to sale, the heirs of Wyatt were properly joined with the administrator as parties.
It may be said, on the other hand, that Phillips and wife were directly interested in the subject matter in litigation, and were not only proper, but necessary parties, and not being before the *247court, it properly refused to give a judgment for the plaintiffs. It may be conceded that Phillips and wife might properly have been made parties, but we are not prepared to say that they were necessary ones. The proceeding in this case was not instituted for the purpose of obtaining a general judgment for the debt, but merely to subject a special fund, upon which it had been charged, to its liquidation. This fund or property, to take the strongest view of the matter against Phillips and wife, had been evidently looked to, and regarded as the primary source of payment. And the only interest that these parties could have had in the present proceeding, was to have seen that the security for the debt, if they are ultimately liable for it, was not misapplied. In this view, it cannot be said that they were such necessary parties, for want of whom a decree should have been refused by the court upon the hearing. Nor does it appear to be the usual or better practice, when all the necessary parties have not been made, and there is no exception taken for want of them, to dismiss a case on the hearing for want of parties; but the court will generally continue it with an order to make the parties.
The objection that the suit was intended to charge Wyatt’s estate with the payment of the debt of another party, for payment of which he did not bind himself by a promise in writing, is answered by the fact already adverted to, that the leading object of the suit was not the recovery of judgment against the estate for the debt, but to subject the property charged with its payment for its satisfaction. It presents nothing more than the ordinary case of pursuing a trust fund into the hand of a third party, to whom it has passed. But if the object were to obtain a judgment against Wyatt’s estate for the debt, it appears by no means clear that the -objection would be well taken. If a party received money from A. to pay to B., the latter may maintain a suit against him for it. And if one, for sufficient consideration, undertake to pay a debt due to-another by a third party, such undertaking is not within the statute of frauds. It may, we think, be well said, in view of all the facts in the present case, that it falls within this rule. The debt was contracted with the express understanding and agreement .that it was to be liquidated by Wyatt and wife. It was, in fact, a *248part of the purchase money of the lot which they were buying, and in the recitals of the deed accepted by them, it is shown that they had bound themselves to pay it. It is true that they were not liable simply and alone upon the note, but the entire transaction, of which the note forms a part, shows that they had undertaken and hound themselves to pay the debt evidenced by it.
On the trial a jury was waived, and the case upon the facts, as well as law, was submitted to the court; and in such cases it is usual in this court, if it is apparent from the record that the proper judgment can be rendered here, not to remand the case upon its reversal, but to pronounce such judgment as should have been given in the court below. But in the present case, it appears that the-appellants are in possession of the mortgaged property; the debt is consequently entitled to a credit to the amount of rents they hav'e received; and as the amount received is not shown, the case must he remanded for further proceedings in the District Court.
The judgment is reversed and the cause remanded.
Reversed and remanded.