
542 S.W.2d 429 (1976)
John BERNARD, d/b/a Bernard Welding Service, and Thomas Douglas Baker, Appellants,
v.
GULF INSURANCE COMPANY, Appellee.
No. 6514.
Court of Civil Appeals of Texas, El Paso.
September 15, 1976.
Rehearing Denied October 6, 1976.
Warren Burnett Associated, Richard J. Clarkson, Odessa, for appellants.
Rassman, Gunter & Boldrick, Emil C. Rassman, John E. Gunter, Midland, for appellee.

OPINION
OSBORN, Justice.
This case involves the duty to defend under a General-Automobile Liability Policy *430 and the effect of a prior declaratory judgment construing such policy and determining the duty to defend and pay a claim under such policy. Having concluded that the prior judgment is not res judicata of the issues in the pending case, we reverse and remand the case to the trial Court.
In March, 1972, Gulf Insurance Company issued an insurance policy to John Bernard, d/b/a Bernard Welding Service, for a period of one year which contained comprehensive general liability coverage, but "completed operations" hazards and "products" hazards were excluded. In November, 1972, Mr. Bernard performed some welding on the substructure of a drilling rig for Cactus Drilling Company, and also welded some flanges onto three pieces of drill pipe. A few days later, Thomas Baker, an employee of Cactus, was seriously injured when a weld on the drill pipe broke. Mr. Baker sued Mr. Bernard for damages in Cause No. B-40,487 in Ector County alleging negligence in his welding work for Cactus Drilling Company. Gulf refused to defend Bernard and filed suit in Cause No. B-40,659 for a declaratory judgment as to its duties under the insurance policy issued to Bernard. In the deposition of Bernard taken in that case, he testified that he had completed the welding job on the drill pipe and left the rig site prior to the accident.
In the declaratory judgment case, the trial Court entered a summary judgment which provided:
"* * * Gulf Insurance Company, has no duty or obligation to defend John Bernard, d/b/a Bernard's Welding Service, pay any part of any adverse judgment rendered against John Bernard, d/b/a Bernard's Welding Service, or perform any other legal obligation to defendant John Bernard, d/b/a Bernard's Welding Service, with respect to all claims, demands and causes of action made and asserted by Thomas Douglas Baker against John Bernard, d/b/a Bernard's Welding Service, in Cause No. B-40,487 filed in the 161st Judicial District Court of Ector County, Texas, styled Thomas Douglas Baker v. John Bernard, d/b/a Bernard Welding Service, and any and all other claims, demands and causes of action growing out of, connected with, or incidental to Thomas Douglas Baker's accidental injury sustained by him on November 7, 1972 in Ector County, Texas while working as an employee of Cactus Drilling Company."
No appeal was taken from that judgment and it became final thirty days after being entered on February 11, 1974.
In October, 1974, Baker filed an amended petition in Cause No. B-40,487 in which he alleged that the defendant had "failed to complete the repair work" and set forth certain acts of negligence as a basis for recovery of damages. Gulf then filed Cause No. B-43,617 seeking a declaratory judgment as to its duty to defend such amended pleading, and alleged the prior judgment was res judicata as to the issues involved. After Gulf filed a motion for summary judgment, an affidavit was filed by Bernard in which he said:
"I was hired by Cactus Drilling to repair the rig on which Thomas Douglas Baker was injured on or about the 7th day of November, 1972. I was hired by Cactus Drilling to repair a drill collar, piping and parts of the substructure of the rig on which Thomas Douglas Baker was injured. I stopped my repair work on the rig a day or two prior to the injuries sustained by Thomas Douglas Baker. I stopped my repair work on the rig because I was told to do so although I did not feel that I had completed the proper amount of welding of the parts of the rig that I had been hired to repair. I did not feel that I had applied enough weld so that the parts of the rig which I was repairing could be used for the purposes for which they would normally be used. I stopped my welding before I felt in my own mind I had completed the job which I was hired to do."
In November, 1975, the trial Court granted the motion for summary judgment in Cause No. B-43,617 and held that its prior judgment entered on February 11, 1974, in Cause No. B-40,659, was res judicata as to *431 Gulf's duties, obligations and liabilities under its policy issued to Bernard. It again ordered that Gulf had no duty to defend Bernard or pay any part of any adverse judgment rendered against him with respect to the claims, demands and causes of action of Thomas Baker in Cause No. B-40,487. This appeal is from that judgment.
In determining the liability of an insurer to defend, proof of the allegations are not material and the issue is determined from the pleadings, without regard to the validity of those contentions. Argonaut Southwest Insurance Company v. Maupin, 500 S.W.2d 633 (Tex.1973); Heyden Newport Chemical Corporation v. Southern General Insurance Company, 387 S.W.2d 22 (Tex.1965); Fort Worth Lloyds v. Garza, 527 S.W.2d 195 (Tex.Civ.App.-Corpus Christi 1975, writ ref'd n. r. e.); and Amundsen v. Great Central Insurance Company, 451 S.W.2d 277 (Tex.Civ.App.-El Paso 1970, writ ref'd n. r. e.).
Based upon the pleadings as they exist at any given time, a declaratory judgment may be entered with regard to a duty to defend under the allegations of such pleadings. Ranger Insurance Company v. Mustang Aviation, Inc., 533 S.W.2d 903 (Tex.Civ.App.-Eastland 1976, writ ref'd n. r.e.). Obviously, such a judgment would be res judicata only as to the pleadings as they existed at the time of the judgment, but such judgment would not be res judicata as to any amended pleadings which might substantially change the nature of the cause of action alleged or assert a new or different cause of action and thereby change the basic nature of the suit. Mobile County v. Kimball, 102 U.S. 691, 26 L.Ed.238 (1881); State v. Standard, 414 S.W.2d 148 (Tex. 1967); and Palmer v. Bizzell, 229 S.W.971 (Tex.Civ.App.-Galveston 1921, no writ). In this case the original pleading asserted a claim based upon "completed operations," which was not covered by the Gulf policy and the trial Court properly so declared in the first declaratory judgment. The amended pleading asserted that there were no completed operations; thus, the policy exclusion did not apply to the amended pleadings and the first declaratory judgment could not be res judicata as to the new assertions presented in the amended pleadings. As noted in Swilley v. Hughes, 488 S.W.2d 64 (Tex.1972), a motion for summary judgment on the pleadings partakes of the office of a general demurrer. Certainly where the pleadings were amended to meet an exception, the old general demurrer or a special exception would fail. So also a claim of res judicata based upon a summary judgment must fail where the pleadings have been amended.
Nevertheless, the fact remains that the first declaratory judgment did decree that Gulf had no duty to pay any part of any adverse judgment rendered against Bernard in Cause No. B-40,487, and no obligation with respect to "any and all other claims, demands and causes of action growing out of, connected with, or incidental to Thomas Douglas Baker's accidental injury * * *." That judgment is final, no appeal having been taken from the initial declaratory judgment. If that part of the judgment be valid, it would dispose of Gulf's primary obligation under its policy to pay any judgment entered against Bernard and could be dispositive of the primary issues even under the amended pleading in the initial suit.
We conclude that insofar as the first declaratory judgment purported to determine a duty to pay any final money judgment or otherwise determine liability for "any other claims, demands and causes of action," it was beyond the jurisdiction of the District Court, was a void judgment, and could not be res judicata of those issues. In Firemen's Insurance Company of Newark, New Jersey v. Burch, 442 S.W.2d 331 (Tex.1968), the Court in reviewing a declaratory judgment, which determined a coverage question and duty to pay, said:
"The question of the insurance company's duty to defend presented a justiciable issue. No complaint is made of the trial court's disposition of this issue and that portion of the trial court's judgment relating thereto will not be disturbed. However, that portion of the decree *432 which attempts to declare the liability of the insurance company upon any judgment which may hereafter be rendered in the case of Burch v. Buttler is purely advisory in nature and beyond the power and jurisdiction of the district court to render. Accordingly, such portion of the trial court's judgment is vacated."
In both Ranger Insurance Company v. Mustang Aviation, Inc., supra, and Fort Worth Lloyds v. Garza, supra, the Courts concluded that an issue with regard to the duty to pay could only be determined after a money judgment was obtained and any declaratory judgment prior to that time would be a purely advisory opinion which a Court would have no jurisdiction to render. Obviously, the same rule as to a determination of a duty to pay would also apply as to a determination of "any and all other claims, demands and causes of action growing out of, connected with, or incidental to Thomas Douglas Baker's accidental injury * * *", if such claims and causes of action had never been asserted in a pleading at the time of the first declaratory judgment.
Accordingly, we conclude that the first declaratory judgment was not res judicata as to the issues raised by the amended pleadings filed after the entry of that judgment, and the provisions of the first declaratory judgment with regard to the duty to pay and the obligation as to other claims and causes of action was beyond the jurisdiction of the Court and a void judgment, and therefore not res judicata as to those issues. The judgment of the trial Court is reversed and the case is remanded to the trial Court.
WARD, Justice (concurring).
I concur in the opinion written in this case, but would like to point out that we are holding that a successful collateral attack can be made on the prior judgment of the District Court where in the prior case it had jurisdiction of the persons of both John Bernard and Thomas Douglas Baker, it had jurisdiction of the subject matter of the suit and it had full capacity to act as a Court. Even with this, we are holding that the District Court had no power and no jurisdiction to enter the judgment in Cause No. B-40,659 where it attempted to adjudicate as to new causes of action that had not then been alleged and as to the payment of any adverse judgment that might be rendered against Bernard in Cause No. B-40,487. We are bound by the clear language used by the Supreme Court in Firemen's Insurance Company of Newark, New Jersey v. Burch, supra.
