
20 Cal.App.2d 442 (1937)
WESTERN SURETY COMPANY (a Corporation), Appellant,
v.
THE MUNICIPAL COURT OF THE CITY OF LOS ANGELES, Respondent.
Civ. No. 11327. 
California Court of Appeals. Second Appellate District, Division Two.  
April 20, 1937.
 Richard H. Cantillon, John E. Glover and Patrick F. Kirby for Appellant.
 Everett W. Mattoon, County Counsel, and Fred M. Cross, Deputy County Counsel, for Respondent.
 Wood, J.
 A petition was filed in the superior court by plaintiff surety company to prevent the Municipal Court of the City of Los Angeles from entering a judgment upon a bail bond which it had executed and which had been declared forfeited. Upon the sustaining of a demurrer to the petition judgment was rendered denying a peremptory writ, from which judgment this appeal is prosecuted.
 From plaintiff's petition it appears that one Riley was arrested on July 5, 1936, upon a warrant issued by the justice of the peace of Malibu township in which he was charged with the crime of rape. There appeared on the warrant the statement "Defendant is to be admitted to bail in the sum of $2000." Plaintiff executed a bail bond in which it is recited: "An order having been made on the 5th day of July, 1936, by John L. Webster, a Judge of the Justice Court, Township of Malibu, County of Los Angeles, State of California, that said defendant Robert Riley Booking No. ... be held upon a charge of Rape ... a felony ... upon which he has been admitted to bail in the sum of Two Thousand ($2000.00) Dollars in an action now pending against him on behalf of the People of the State of California." The bond was on July 5, 1936, delivered to Myer B. Marion, the justice of the peace of Belvedere township, who was at the time in the city of Los Angeles. The bond was approved by Judge Marion, who issued an order for the release of Riley "to appear Justice's Court Malibu, July 6, 1936 10 a. m." The bond was received and approved by the justice court of Malibu township on July 8, 1936. Riley failed to appear in the justice court of Malibu as required and the court declared the bond forfeited. No application was made within ninety days thereafter for a discharge of the forfeiture.
 It is contended by appellant that Judge Marion of Belvedere township did not have authority to approve the bond and order the release of Riley and that for this reason the bond is of no binding force. [1] Defects and irregularities, if any, in the proceedings preliminary to the taking of bail *444 are considered as waived by the surety when it assumes its obligations as such at the time of the execution of the bond. It is settled law in California that the approval of a bail bond and the justification of sureties is not a part of the contract of bail. (People v. Penniman, 37 Cal. 271; People v. Shirley, 18 Cal. 121; People v. Fidelity & Deposit Co., 106 Cal.App. 686 [289 P. 896].) [2] The bond was executed for the purpose of releasing Riley, who was then in custody. Its purpose was effected when Judge Marion attached his approval and ordered Riley's release. No prejudice has been suffered by plaintiff by reason of the approval of the bond by the justice of Belvedere township rather than the justice of Malibu township. There is some conflict among the authorities, but the better reasoned cases hold that the jurisdiction of the court which approved the bond cannot be questioned by the surety in an action thereon after forfeiture. (6 Cor. Jur., p. 1004, sec. 246; People v. Watkins, 19 Ill. 117; People v. Meacham, 74 Ill. 292; Dilley v. State, 3 Idaho, 285 [29 P. 48]; Pack v. State, 23 Ark. 235.) The surety may not avoid its obligations by contending that the bond was presented to the wrong magistrate and that the approval and release thereby obtained were illegal. The action of the superior court in sustaining the demurrer and denying a writ of prohibition to restrain the entry of a summary judgment in the municipal court was proper.
 The judgment is affirmed.
 Crail, P. J., and McComb, J., concurred.
