The complaint sets forth a cause of action for broker’s commissions claimed to have been earned by plaintiff in having procured a purchaser for defendants’ real estate. The answer sets up as a separate defense that plaintiff had no written authority to offer the real estate for sale from the owners of the property or their attorney in fact, appointed in writing, or the pergon who had made a written contract for the purchase of the said property with the owners thereof. The said defense also alleged that the services of plaintiff in offering the property for sale and negotiating for such sale, as claimed in the complaint, were performed in the city of New York, and‘ that New York is a city of the first class. The plaintiff demurred to this separate defense, and the demurrer was sustained. Defendants appeal. The ground of the demurrer is that the allegations of said separate defense are insufficient in law on the face thereof.
Section ó/jod, c. 128, p. 312, Laws 1901, provides as follows, viz.:
“In cities of the first and second class, any person who shall offer for sale any real estate without the written authority of the owner of such property, or of his attorney in fact, appointed in writing, or of a person who has made a written contract for the purchase of such property with the owner thereof, shall be guilty of a misdemeanor.”
The demurrer admits the truth of the allegations of the defense, and therefore, for the purposes of this appeal, we must conclude that plaintiff, in performing the services upon which he bases his complaint, was guilty of a misdemeanor. As one cannot recover compensation for doing an unlawful act, the defense set up in the answer was valid and effective.
The interlocutory judgment must be reversed, with costs, and the defendants have judgment on the issue of law raised by the demurrer, with costs. All concur.