
182 Kan. 310 (1958)
321 P.2d 167
LINNIE SUITS, MABEL BURLINGAME, and PAUL A. SUITS, Appellants,
v.
MOBIL CRUDE PURCHASING COMPANY, INC., Appellee, JAMES LEROY YOUNG and HARRIETT YOUNG Substitute Appellees.
No. 40,729
Supreme Court of Kansas.
Opinion filed January 25, 1958.
Evart Mills, of McPherson, argued the cause and was on the briefs for the appellants.
Morris Moon, of Augusta, argued the cause and was on the briefs for the appellees.
The opinion of the court was delivered by
PARKER, C.J.:
Plaintiffs commenced this action in McPherson County against the defendant Mobil Crude Purchasing Company, Inc., by filing a petition alleging that they were the owners and entitled to receive one-fourth of the royalty oil runs from real estate located in Butler County; that such defendant was the owner of an oil and gas lease and was taking and receiving the oil produced from the described premises; and that since October 29, 1955, defendant, although demand had been made upon it, had failed and refused to pay plaintiffs their proper share of the amount realized from the sale of such oil runs, amounting to $50 per month, for all of which they prayed judgment.
After service of summons the defendant filed a motion stating that it was appearing before answer, pursuant to G.S. 1949, 60-418, and requesting an order of the court substituting James LeRoy Young and Harriet Young as parties defendant in the action. In support of this request such motion stated that there was a controversy between plaintiffs and the Youngs as to who was entitled *311 to the proceeds from the sale of a one-fourth royalty interest of the oil and gas then being purchased by Mobil from the property described in the petition; that Mobil had no interest in the subject matter of the action other than to pay the moneys due to the proper parties for the crude oil attributable to such undivided one-fourth royalty interest, but that due to the conflict of interests it could not safely pay out such money; that Mobil had been running oil from the tract in question and there had been accumulated for the period November 1, 1955, to July 1, 1956, the sum of $322.79, attributable to such one-fourth royalty interest, which sum it had been holding in suspense and would so hold the same until further orders of the court; and that in addition to such sum additional sums would accumulate from time to time as oil from the involved premises was sold.
Based on the allegations of its motion Mobil prayed for an order substituting James LeRoy Young and Harriet Young as parties defendant in lieu of movant and a further order directing the disposition of the moneys held in suspense, as well as any other moneys which might accumulate during the pendency of the action.
After a hearing on the foregoing motion the court ordered that the Youngs appear in the action on or before twenty days and either set up or relinquish their claims to the amount then in the hands of Mobil, attributable to the one-fourth royalty interest in the described property and to all additional sums which in the future might be attributable to such royalty interest, and ordered Mobil to pay all such sums to the clerk of the court until further orders. In addition such court directed that a copy of its order be served upon the Youngs by either personal or resident service by the Sheriff of Butler County, such service to be made within five days.
Following service of the order upon them the Youngs filed a motion wherein they appeared specially and moved the court to quash the pretended service of summons upon them for reasons (1) the court had no jurisdiction to try the cause by virtue of the venue of the action and (2) the court was without jurisdiction of the moving defendants or the subject matter of the action.
When the last mentioned motion was overruled the substituted defendants were granted twenty days in which to answer or plead. Thereafter plaintiffs filed an amended petition, the pertinent portions of which read:

*312 "4. That the defendant Mobil Crude Purchasing Company, Inc., operates a crude oil pipe line gathering system and has been taking and transporting to its refinery all of the oil produced from the following described real property situated in Butler County, Kansas, to wit: (describing it), and by reason thereof is obligated to pay to the owners of the leasehold and the owners of the minerals in and under said property the value in money of that part and proportion of the oil so taken which it attributable to such owners.
"5. That the plaintiffs are the sole legal heirs of G.A. Suits who was on February 3, 1938, the legal owner of an undivided one-fourth interest in and to all of the above described property and in actual possession thereof. That on February 3, 1938, G.A. Suits and Linnie Suits, his wife, conveyed such one-fourth interest to Clyde R. Brown and Ella Brown by deed which deed was thereafter recorded in the office of the Register of Deeds of Butler County, Kansas, in Book 178 of Deeds at page 174 which deed is made a part hereof by reference. That said deed contained the following exception and reservation, to wit:
"`EXCEPTING AND RESERVING TO THE GRANTORS, G.A. Suits and Linnie Suits their undivided interest in the oil, gas, and other minerals in and under the North Half of the Southwest Quarter (N/2 SW/4) of Section Ten (10) in Township Twenty-seven (27) South, in Range Four (4) East of 6th P.M. Aforesaid for and during their natural lives.'
"6. That G.A. Suits died intestate at Augusta, Kansas, on October 29, 1955, and that no probate proceedings were had concerning his estate. That said G.A. Suits was survived by his widow, Linnie Suits, and by his two children, Paul A. Suits and Mabel Burlingame, and that he had no other children or child or children of any deceased child. That the plaintiffs as the legal heirs of G.A. Suits, deceased, inherited and have owned from the date of his death the minerals reserved and excepted from such transfer during the life of Linnie Suits.

"7. That the defendant, Mobil Crude Purchasing Company, Inc., has from the death of G.A. Suits to November 30, 1956, received oil attributable to said reserved and retained mineral interest of the value of $483.95 and has deposited such sum of money with the Clerk of the District Court of McPherson County, Kansas, in this action for distribution and payment by order of the court to the persons entitled to such money.
"8. That the defendants James LeRoy Young and Harriet Young purchased the property conveyed by G.A. Suits and Linnie Suits to Clyde R. Brown and Ella Brown and now own the same, but that such purchase and ownership is subject to the exception and reservation set forth in paragraph 5 hereof. That said James LeRoy Young and Harriet Young claim to be entitled to receive the said $483.95 deposited with the Clerk of this Court.

"9. Plaintiffs allege that the pretended claims of James LeRoy Young and Harriet Young to the $483.95 on deposit in this court are wholly without merit for the reason that the grantees and their assigns in said deed dated February 3, 1938, were not to receive the one-fourth of the mineral until both G.A. Suits and Linnie Suits should die. Linnie Suits is still living and said exception and reservation will continue in effect until her death.

"WHEREFORE, Plaintiffs pray judgement that they are the owners of the *313 $483.95 paid to the Clerk of this Court by Mobil Crude Purchasing Company, Inc., and that such sum be forthwith disbursed to them; and that the defendants James LeRoy Young and Harriet Young have no interest in said sum of money and that the costs of this action be taxed to the last named defendants." (Emphasis supplied.)
Upon the filing of the amended petition the Youngs filed a motion requesting that plaintiffs be directed to make that pleading more definite and certain in certain particulars. This motion was overruled in its entirety and the substituted defendants were granted ten days in which to plead. Within the time granted the substitute defendants filed a demurrer, one ground of which was based upon the premise the court had no jurisdiction of the person of such defendants nor of the subject of the action. After a hearing the demurrer was sustained on such ground. Thereupon plaintiffs perfected an appeal from that ruling and bring the case to this court under specifications of error charging that the trial court's action in sustaining the demurrer on the ground stated was erroneous.
At the outset it should be stated that in this jurisdiction a petition is demurrable if it appears on its face that the trial court has no jurisdiction of the subject matter of the action. (See G.S. 1949, 60-705, First.) That, in our opinion, is the decisive question involved in this case.
From an examination of the record it appears the trial court's action in sustaining the demurrer was based on the ground that under the allegations of the amended petition it had no jurisdiction of the subject of the action because of the provisions of the Laws of 1953, Chapter 276, Section 1, now G.S. 1955 Supp., 60-501, which read:
"Action for the following causes must be brought in the county in which the subject of the action is situated, except as provided in the next section: First  For the recovery of real property, or of any estate or interest therein, or any estate or interest created by an oil, gas or mineral lease or any oil or gas royalty, or for the determination in any form of any such right or interest, or to bar any defendant therefrom ..." (Emphasis supplied.)
Looking through form to substance it is clear from allegations of the pleading just mentioned, particularly those heretofore underlined for purposes of emphasis, that this was an action (a) for the recovery of an interest created by an oil, gas or mineral lease; (b) for the determination in some form of such right or interest; and (c) to bar the appellees from any right or interest therein. With the amended petition construed as just indicated we have no difficulty *314 whatsoever in concluding that the trial court's action in sustaining the demurrer to the amended petition was proper and must be upheld.
In reaching the conclusion just announced we have rejected, not overlooked, several contentions advanced by appellants in support of their position. One, which should be specially treated, is that the money alleged to have been due from Mobil for accrued oil runs is the subject of the action. Due to legislative fiat this contention lacks merit and is not debatable. See Laws of 1953, Chapter 276, Section 2, now G.S. 1955 Supp., 60-502, definitely indicating that in an action such as is here involved the interest created by the oil, gas or mineral lease is the subject of the action. Other contentions, although interesting, need not be labored. It suffices to say, in a general way, that they are all based upon the erroneous concept this action is not one to recover an estate or interest created by an oil, gas or mineral lease or an oil or gas royalty, or for the determination on any form of such right or interest, or to bar any defendant therefrom, and for that reason cannot be upheld.
Finally it is argued, that having been substituted as defendants in the action pursuant to the provisions of G.S. 1949, 60-418, the appellees are barred and estopped from denying the jurisdiction of the court over the money involved after Mobil had specifically asked the court to exercise jurisdiction over such money and had paid it into court. We are cited to and know of no authorities supporting this position. Moreover, there are two short and simple answers thereto. In the first place the parties to an action cannot waive the jurisdiction of the court as to subject matter of the action (In re Estate of Freshour, 177 Kan. 492, 499, 500, 280 P.2d 642; City of McPherson v. State Corporation Commission, 174 Kan. 407, 412, 257 P.2d 123; Behee v. Beem, 156 Kan. 115, 118, 131 P.2d 675). In the second, once the amended petition was challenged by a demurrer, based on lack of jurisdiction of the subject matter, it was not only the trial court's right but its duty to sustain that challenge if such appeared on the face of the petition.
Having disposed of all matters subject to appellate review and finding nothing to warrant a reversal of the trial court's ruling on the demurrer its judgment must be and is hereby affirmed.
It is so ordered.
SCHROEDER, J., not participating.
