
89 Cal.App.2d 232 (1948)
MARY E. LOOMIS, Appellant,
v.
GEORGE C. LOOMIS, Respondent.
Civ. No. 16279. 
California Court of Appeals. Second Dist., Div. Three.  
Dec. 20, 1948.
 Harold M. Davidson for Appellant.
 Snyder, Fletcher & Glaister for Respondent.
 WOOD, J.
 Action for divorce. Defendant answered, and also filed a cross-complaint alleging that plaintiff was not a fit person to have the custody of their 3- year-old child. Plaintiff answered the cross-complaint and denied the allegation that she was not a fit person to have custody of the child. When the case came on for trial on June 26, 1946, a written stipulation of the parties was filed and it provided, among other things, as follows: that the action might be tried on the cross-complaint as a default matter; that "upon the action being so tried as a default action, the Court may award to plaintiff the custody of the minor child of the parties hereto"; and that neither party should be permitted to remove the child from the State of California. When the case was called for trial the judge said, "I see it is stipulated that this case may be tried as a default" on the cross-complaint. The attorney for the cross-complainant then said, "That is on the cross- complaint of the husband, yes." The attorney for plaintiff was present in court. A decree of divorce was granted to cross-complainant and the custody of the child (then 4 1/2 years of age) was awarded to him, with the right on the part of plaintiff to visit the child at reasonable times. Plaintiff appeals from the judgment.
 After the court had announced, as above stated, that it was stipulated that the case might be tried as a default on the cross-complaint, the cross- complainant was called as a witness, and thereupon the following occurred: "Mr. Fletcher [attorney for cross-complainant]: Mr. Davidson is the attorney of record for the plaintiff and cross-defendant, and he is present in court, your Honor. The Court: If it is a default there is not any appearance for plaintiff. Mr. Fletcher: There was an Answer, or rather, a case filed. The Court: He is welcome to stay here as a silent spectator with the emphasis on the 'silent.' " *234
 The cross-complainant then testified, stating in substance that he had been overseas with the Navy about a year, and that for a while during that time he received affectionate letters from his wife, and then for a while he received letters from her about a man she had been going with, and then he received a letter from her wherein she asked for a divorce; that when he knew he was to be separated from the Navy at a certain time at San Pedro, he asked his brother to bring the plaintiff and the baby to San Pedro at that time; that his brother notified the plaintiff, but she did not go to meet the cross-complainant; that after he was discharged, he and his brother went to the beauty parlor where plaintiff was working, and she greeted cross- complainant very casually as if he were a stranger; that he asked her where the baby was and she said that "Clarence" had gone to get him; that Clarence was the man she was working for, and the man she had been running around with; that the first time he saw the baby (after his return from the service) was when he saw him in that man's arms; that when cross-complainant and his wife arrived at their home she had everything packed and ready to move out of the house, and she said she had sold the house and was going to move; that he then left the house, and returned about midnight; that she had made a bed for him on the sofa, but he went to her bedroom and went to bed, and she then got out of bed and went to the sofa; that the next morning she said she would not stay another night in that house, and then he and his wife and the baby, accompanied by his brother, went to the other house which she had prepared for herself; that it was a house "she was supposed to have been renting from this Clarence"; that she "took the key to the house and said, 'This is my home' "; and that he (cross-complainant) then went away. He also identified several letters that he had received from his wife while he was in the Navy. Those letters were received in evidence, and excerpts therefrom were read during the trial.
 When the attorney for cross-complainant had concluded his questioning of the witness, the trial judge asked the name and age of the child, and then the following occurred: "The Court: I see there is a stipulation about the custody of the child, to which, of course, I should pay no attention. The parties and the attorneys cannot agree on anything about the child's custody that is binding on the Court. It is up to the Court. Forget that for as a matter of fact it is not worth the paper it is written on. Q. [By the court] What *235 is your idea as to who should have custody of the child? Do you want him or do you want your wife to have him? A. [By the cross-complainant] I would like to have the child very much. Q. What arrangements have you for taking care of the child?" The cross-complainant then testified that he resided in Maryland; that he had no way of taking care of the child where he resided; that if he had custody of the child he would leave him with his (cross-complainant's) two aunts who live in California and have nice homes; that he thought the child would be better off with the cross-complainant's aunts than it would be with its mother; and that the mother puts the child in a nursery during the day while she works.
 The brother of cross-complainant testified that at one time, at a party at his sister's house, the plaintiff was escorted to the party by Clarence; that the witness asked plaintiff to go with him to San Pedro to see her husband discharged from the service, but she said that she had a full book of appointments and could not go; that she let him have her automobile for the trip; that when he returned with cross-complainant to the beauty parlor the plaintiff and cross-complainant greeted each other by shaking hands; that within a few minutes after they arrived there Clarence came there with the baby in his arms; that he (witness) was present when the plaintiff and her husband went to the house owned by Clarence, and that she put the key in the door and said, "This is my home."
 When the attorney for cross-complainant had finished questioning the brother, the following occurred: "Mr. Fletcher: I think that is all. Your Honor, with regard to custody of the child, I want to keep faith with the attorney. We discussed it. The Court: You may want to, but the court is not bound by any agreement you make with the attorney. The order will be that plaintiff take a decree." Then the attorney for plaintiff, who had been present during the trial, said: "Your Honor, may I be heard on behalf of my client?" Then the following occurred: "The Court: You sit down. Mr. Davidson [attorney for plaintiff]: May I be heard as a friend of the Court: The Court: No, you cannot be heard. This is a default case. If you will stop interrupting the Court I will finish my order; and if these gentlemen start to interrupt, Mr. Bailiff, put them out. The order will be that the plaintiff [cross-complainant] take a decree. It may be entered. The custody of the child, Donald Clayton Loomis, *236 is awarded to the defendant and cross-complainant, subject to the right of the plaintiff and cross-defendant to visit him at reasonable times. That is the whole decree, I am certainly not going to award the young child to an adulteress."
 [1] Appellant contends that the trial court abused its discretion in refusing to permit her counsel to be heard after it appeared that cross- complainant violated his stipulation and that the court did not intend to follow the stipulation of the parties with reference to custody of the child. The circumstances were such that plaintiff's attorney was entitled to be heard. The plaintiff had commenced the action and sought the custody of the child, and had answered the cross-complaint and made an issue of cross- complainant's allegation that she was not fit to have the custody of the child. The case was on the calendar as a contested case until it was called for trial. The stipulation provided that the action might be tried on the cross-complaint "as a default matter." The answer to the cross-complaint was not withdrawn, but it remained as a pleading in the case. The stipulation was not equivalent to a default in the sense that she had failed to answer the cross-complaint. It was not an admission by the plaintiff that the allegations of the cross-complaint were true. The effect of the stipulation was that plaintiff had agreed, upon condition that cross-complainant would observe the stipulation, that she would not participate in the trial and that the trial procedure, insofar as she was concerned, should be the same as if she had failed to appear at the trial in response to a notice of trial. It was implicit in the stipulation that, as between the parents, the issue as to the custody of the child had been settled, and that the bona fide opinion of the cross-complainant, with respect to the custody of the child, was that the best welfare of the child would be served by awarding the custody of the child to the mother. Obviously plaintiff relied upon that representation in stipulating that she would not participate in the trial--she had sought the custody of the child under the allegations of her complaint and under the allegations of her answer to the cross-complaint. Plaintiff adhered to her stipulation and did not attempt to participate in the trial until it appeared that cross-complainant had violated his stipulation and that the court did not intend to follow the agreement of the parents as to the custody. When the cross-complainant was asked by the court what his idea was as to who should have custody of the child, and whether he wanted the child or whether he wanted the wife to have him, he replied *237 that he would like very much to have the child. He is not to be criticized for testifying that he would like to have the child, but he should have qualified his answer so that it would not be contrary to his stipulation, if in fact his stipulation recited his bona fide opinion that the wife should have the custody. In addition to violating his stipulation in giving that unqualified answer, he violated it further by testifying, in response to a question by the court, that the child would be better off with his aunts than it would be with his wife. The statement of the attorney for cross-complainant, at the time he rested his case, to the effect that with regard to custody of the child he wanted "to keep faith with the attorney," indicates that he considered that the cross-complainant had not adhered to the stipulation. When the attorney made that statement with respect to keeping faith, the court said, "You may want to, but the court is not bound by any agreement you make with the attorney." That statement by the court indicates that the court knew that a question had arisen as to whether the cross-complainant treated the plaintiff fairly in the matter of the stipulation. When the attorney for the plaintiff, immediately following that statement by the court, addressed the court and asked to be heard on behalf of his client, the judge told him to sit down. When the attorney for plaintiff, immediately thereafter, asked to be heard as a friend of the court, the judge said he could not be heard, and then ordered the bailiff to put him out if he started to interrupt the court. When the attorney for plaintiff made those requests to be heard, it was obvious that he intended then and there to seek relief from the advantage which cross-complainant had taken of plaintiff by reason of the stipulation. The trial judge knew from the beginning of the trial that the parents had agreed that the custody might be awarded to the plaintiff. Of course, the court was not bound by the agreement of the parties regarding the custody of the child. It was clear, however, that if cross-complainant had expressed his bona fide opinion regarding custody in the stipulation, then he took advantage of plaintiff in giving a contrary opinion at the trial; and it was clear that if he expressed his bona fide opinion regarding custody in his testimony, he misled the plaintiff by his contrary opinion in the stipulation. In either event, it was obvious, or should have been obvious, to the trial judge, when counsel for plaintiff asked to be heard, that the cross-complainant, as a result of the stipulation having been made, had unjustly and intentionally taken advantage of *238 plaintiff in the matter of custody of the child. In this state of the record, no reason except excessive legal formalism could demand that the court refuse to hear plaintiff's attorney. It seems that the trial judge was especially concerned with the enforcement of his admonition, made at the beginning of the trial, that plaintiff's attorney remain "silent." The trial judge erred prejudicially in refusing to permit plaintiff's attorney to be heard.
 [2] Appellant's contention that the court erred in granting custody of the child to the cross-complainant (father) is sustained. As between parents adversely claiming custody of a child, neither parent is entitled to the custody as a matter of right; but, other things being equal, if the child is of tender years, the custody of the child should be given to the mother. (Civ. Code,  138; Washburn v. Washburn, 49 Cal.App.2d 581, 588 [122 P.2d 96].) The father stated that he could not take care of the child at his home in Maryland; and that if he had the custody of the child he would leave him with the father's aunts in California. It appears, therefore, that the trial judge made his order awarding the custody to the father upon the basis that the child would be placed in the homes of strangers. The father had lived with the child only a few months--the child was born in January, 1943, and the father joined the Navy in 1943 and was discharged therefrom in December, 1945, and the parties separated the day after he was discharged. The mother was prepared to take care of the child and she had taken care of him during his life. The evidence was insufficient to justify a finding that the mother was unfit to have custody of the child. There was nothing in the testimony to warrant such an implied finding. The house to which she moved, after cross-complainant returned from the Navy, was referred to as a house owned by Clarence, but the evidence does not show that Clarence lived there. The documentary evidence, the letters which plaintiff wrote to cross- complainant while he was in the Navy, does not warrant such an implied finding. It may be stated generally that the excerpts from the letters, which were read at the trial, show that she told cross-complainant that she had met Clarence at a dancing place; that he was a dentist who worked in a dental laboratory; that he bought a beauty shop and wanted her to work for him at the shop; that he mowed the lawn at her house and painted some porch chairs; that he said he would take her and the child to the beach or the mountains; that he asked her if she would like *239 to see a certain show; that her letters had been misleading because she had pretended that she was lonesome for cross-complainant; that their marriage started out wrong; and that she had been to see a lawyer who said that she had grounds for a divorce. The other parts of those letters (which were not read at the trial) pertained to conditions about the home, the activities and health of the child, and news about friends and relatives. The evidence was wholly insufficient to justify the trial judge's reference to plaintiff as an adulteress. It was an abuse of discretion to award the custody of the child to the father.
 [3] The further contention of appellant that the court erred in granting the interlocutory decree of divorce is sustained. The plaintiff had intended, as shown by her complaint, to seek a decree of divorce, and she had intended, as shown by her answer to the cross-complaint, to oppose his cross- complaint for divorce. As above shown, it was obvious that plaintiff entered into the stipulation and agreed that she would not participate in the trial, upon the condition that cross-complainant would observe the provisions of the stipulation, and with the understanding on her part that he had acted in good faith in stating therein that she should have custody of the child. The provisions of the stipulation were so interrelated and dependent upon each other that the parties were required to accept and to act upon the stipulation as a whole. The cross-complainant could not accept only the part of the stipulation favorable to him, namely, the part relative to the action being tried as a default matter, and disregard the part thereof to the effect that in his opinion custody of the child should be awarded to plaintiff. When cross-complainant violated the agreement, in its principal part insofar as plaintiff was concerned, by disregarding the part of the stipulation pertaining to the custody of the child, and by urging that the court award custody to him, it was apparent that he had taken undue advantage of plaintiff as a result of the fact that she had entered into the stipulation. It was clear that the trial was proceeding as an uncontested matter only by reason of the fact that plaintiff relied upon the stipulation which had been made. Of course, the court was not required to award custody of the child in accordance with the opinion of the parents as expressed in the stipulation. It was required, however, to give consideration to the whole stipulation for the purpose, among others, of determining that the trial, which was based in part upon the stipulation, *240 was fair. When it was apparent that the cross-complainant had disavowed his opinion regarding custody, as expressed in the stipulation, the plaintiff, who had agreed not to participate in the trial by reason of the fact that he had expressed such opinion in the stipulation, should have been afforded an opportunity to withdraw her stipulation and to try all the issues on the merits.
 The judgment is reversed.
 Shinn, P. J., and Vallee, J., concurred.
