
18 Cal.App.2d 366 (1937)
R. L. WILHELM, Appellant,
v.
JUD R. RUSH, Respondent.
Civ. No. 11031. 
California Court of Appeals. Second Appellate District, Division One.  
January 5, 1937.
 Horton & Horton for Appellant.
 William B. Beirne for Respondent.
 Bishop, J., pro tem.
 Plaintiff, feeling aggrieved by a judgment that he take nothing, has appealed. Because we are unable to agree with him that the provision of his contract was illegal, which made his right to recover additional compensation dependent upon the successful outcome of some litigation, we are affirming the judgment.
 [1] Plaintiff's contract was with the defendant, a member of our bar, who was representing a client in some pending litigation and expecting to represent him in some actions to be brought. The client had claimed that fraud had been perpetrated upon him with respect to the matters in litigation and the defendant "engaged plaintiff", to use the language of the findings, "to render and furnish to defendant certain work, labor and services, consisting in part of accounting services, and in part of investigation and research, having as its object the procuring and furnishing, for such proper use as defendant might see fit to make thereof, such discoverable evidence of actual, existing facts as would tend to support" the claims of fraud referred to. A retainer of $500 was to be paid plaintiff and all actual expenses to which he was put were to be repaid him. The findings continue that it was agreed "that in the event of any recovery by" *368 the client "from said claims, actions or litigation, as aforesaid, there should be paid to the plaintiff by the defendant additional compensation for said work, labor and services, said additional compensation to be payable only upon and in the event of some recovery by" the client "from said claims, actions or litigation". Plaintiff has been paid the $500 and further sums "far in excess" of his expenses. The client, up to the time of the trial of this action, had recovered nothing.
 Measured by the contract, the judgment was correct; plaintiff was not entitled to recover anything at this stage of the proceedings. His argument is that the contract should be disregarded, because its provisions are against public policy and hence illegal, and that he should be allowed to recover the reasonable value of his services now.
 [2] In the cases which deal with contracts in general such as the one we have under consideration, the provisions found to be illegal because offensive to public policy fall into two groups: those in which the object is illegal and those in which the terms of compensation are unenforceable. The object of the contract is held to be invalid where that which is sought is evidence or witnesses to attain a definite objective. The case of Quirk v. Muller, (1894) 14 Mont. 467 [36 P. 1077, 43 Am.St.Rep. 647, 25 L.R.A. 87], upon which plaintiff relies, is an illustration of this type. As appears in the opinion: "Indeed, the contract, brought down to a simple statement, is that plaintiff agreed, for a consideration, to procure testimony that would win the lawsuit." Another case of this first class is Harris v. Moore, (1929) 102 Cal.App. 413 [283 P. 76]. In this type of invalid provisions the whole employment is so tainted that no recovery is permitted, which was the result reached in the two cases cited. On the other hand, "Anyone has a right when threatened with litigation, or desiring himself to sue, to employ assistance with a view of ascertaining facts as they exist, and to hunt up and procure the presence of witnesses who know of facts and will testify to them, and this is true whether the action be one of divorce or of any other character." This language found in Hare v. McGue, (1918) 178 Cal. 740, 742 [174 P. 663, L.R.A. 1918F, 1099], was quoted in McNeal v. Foreman, (1931) 117 Cal.App. 155, 162 [3 PaCal.2d 583], and following the principle thus recognized, judgments awarding compensation were approved in these cases. We are of the opinion *369 that the services which plaintiff was engaged to render were lawful, as determined by these cases. See, also, note, 16 A.L.R. 1435.
 The judgment denying plaintiff recovery is, therefore, not to be affirmed because of the invalid character of the services which his contract sought, and we would not have dealt even as briefly as we have with the first group of cases had we not felt it necessary in order the better to evaluate plaintiff's contention and the cases cited on its behalf. [3] Plaintiff argues that the judgment should be reversed because the terms of his contract are invalid which make his right to further compensation contingent on the success of the cause of defendant's client. He relies upon Hare v. McGue, McNeal v. Foreman, and Quirk v. Muller, all already referred to, and upon a memorandum opinion, unreported, by the Appellate Department of the Los Angeles Superior Court.
 An examination of McNeal v. Foreman, supra, reveals no issue or statement about contingent compensation. In Hare v. McGue, supra, there is a statement which supports plaintiff's position, but that the statement was plainly dictum appears from the further declaration of the court (p. 742): "Examining now the contracts by the defendant with plaintiff and Robinson, there was no element in either of them contravening public policy. The compensation of neither was contingent." The unreported opinion rendered by the Appellate Department of the Los Angeles Superior Court dealt with a contract to discover facts and witnesses generically the same as that which we are discussing, but with this vital difference: the facts and witnesses sought were for an action in divorce. So, also, we note, were they in the case of Hare v. McGue, supra. The general rule in this state is that contingent fees for attorneys are unquestionably valid. (3 Cal.Jur. 691; Gomez v. Superior Court, (1933) 134 Cal.App. 19 [24 PaCal.2d 856].) Equally unquestioned is the exception: they are not valid in divorce cases. (Newman v. Freitas, (1900) 129 Cal. 283 [61 P. 907, 50 L.R.A. 548]; Parsons v. Segno, (1921) 187 Cal. 260 [201 P. 580]; Ayres v. Lipschutz, (1924) 68 Cal.App. 134 [228 P. 720]; Theisen v. Keough, (1931) 115 Cal.App. 353 [1 PaCal.2d 1015]; Wiley v. Sisbee, (1934) 1 Cal.App.2d 520 [36 PaCal.2d 854].) The conclusion, therefore, that compensation to discover facts or witnesses may not be made contingent on success in a divorce *370 action, is not inconsistent with the conclusion that such a contract may be valid in an ordinary civil case.
 The case of Quirk v. Muller, supra, dealt with a contract not only providing for compensation contingent upon the outcome, but also limiting the services to be rendered to those which would contribute to a successful outcome. While it stands as an authority in those cases where the purpose of the agreement is invalid, such authority as it may have possessed on the question of the invalidity of provisions for contingent compensation is destroyed by the later case of Haley v. Hollenback, (1917) 53 Mont. 494 [165 P. 459], not involving domestic relations, which directly concludes, after careful consideration, that such provisions are valid for the same reasons that contingent attorney fees are justified.
 So far as we have discovered there is no case, California or otherwise, which would support plaintiff's position. In addition to Haley v. Hollenback, just cited, we find Bell County Board of Education v. Lee, (1931) 239 Ky. 317 [39 S.W. (2d) 492], concluding, as we have, that (p. 493): "A contract by which one employs another to render services in looking up evidence that would establish a claim or which is to be used on a trial is recognized as valid, unless its tendency is to prevent or impede the due course of justice. The mere fact that the recovery of compensation is to be contingent upon the success of the suit is not sufficient to nullify the contract." It was accordingly held "error to submit the case and award judgment on a quantum meruit". As no recovery had yet been had, the contingency on which plaintiff was to become entitled to compensation, "he was not entitled to anything".
 [4] But one further matter merits attention. Plaintiff was thwarted in his attempt to prove that the defendant had received from his client a sum of money which was to be used to pay plaintiff, and under the theory of money had and received, he claims the right to it. The ruling of the trial court is to be approved for this among possible other reasons: any sum placed in defendant's hands to be used to pay plaintiff cannot be said to be unconscionably withheld until such time as payment becomes due. Under our record, that time had not arrived.
 The judgment is affirmed.
 Houser, P. J., and Doran, J., concurred.
