
860 P.2d 305 (1993)
123 Or. App. 460
STATE of Oregon, Respondent,
v.
Sheila McSWEENEY, Appellant.
C92-03-5612C; CA A76533.
Court of Appeals of Oregon.
Argued and Submitted August 20, 1993.
Decided October 6, 1993.
James N. Varner, Deputy Public Defender, Salem, argued the cause for appellant. With him on the brief was Sally L. Avera, Public Defender, Salem.
Jonathan H. Fussner, Asst. Atty. Gen., Salem, argued the cause for respondent. With him on the brief were Theodore R. Kulongoski, Atty. Gen., and Virginia L. Linder, Sol. Gen., Salem.
Before ROSSMAN, P.J., and DE MUNIZ and LEESON, JJ.
ROSSMAN, Presiding Judge.
Defendant pled guilty to two counts of endangering the welfare of a minor. ORS 163.575.[1] She was placed on formal probation for 18 months. The issue is whether the court erred in imposing a special condition of probation requiring defendant to
"refrain from knowingly associating with persons who use or possess controlled *306 substances illegally, or from frequenting places where such substances are kept or sold. May reside with spouse unless he returns to drug use."
Defendant contends that the portion of the condition that refers to her spouse "impermissibly impinges upon" her right of marriage.[2]
Having pled guilty, defendant's challenge to the condition of probation is limited to claims that it exceeds the maximum allowable by law or is unconstitutionally cruel and unusual. ORS 138.050(1); State v. Anderson, 113 Or.App. 416, 833 P.2d 321 (1992). Under ORS 137.540(2)(g) to ORS 137.540(2)(h)(B), a court may require, as special conditions of probation, that a probationer refrain from "knowingly associating with persons who use or possess controlled substances illegally, or from frequenting places where such substances are kept or sold" and refrain from knowingly associating with persons "known by the probationer to be engaged in criminal activities."
A condition of probation is impermissible if it is "unrelated to the offense or * * * goes beyond that necessary to accomplish the purpose of punishment." State v. Martin, supra, n. 2, 282 Or. at 588, 580 P.2d 536. The condition imposed in this case was intimately related to the offense. The endangerment charges were the result of defendant's admitted decision to leave her children with her spouse, whom she knew was using drugs. Allowing defendant to retain custody of her children and live with her husband, regardless of his drug use, would permit defendant to engage in the very criminal activity for which she was convicted.[3] Also, the condition of probation does not "go[] beyond that necessary to accomplish" the aim of probation. It protects defendant's five minor children by increasing the likelihood that defendant will not allow them to "enter or remain in a place where unlawful activity involving controlled substances is maintained or conducted." ORS 163.575. Further, the condition does not require that defendant refrain from any contact with her spouse. It requires only that she not reside with him if he returns to drug use. As drawn, the condition does not interfere with defendant's marital relationship to an impermissible degree. State v. Gilkey, 111 Or.App. 303, 305, 826 P.2d 69 (1992).
Affirmed.
NOTES
[1]  ORS 163.575 provides, in part:

"(1) A person commits the crime of endangering the welfare of a minor if the person knowingly:
"* * * * *
"(b) Permits a person under 18 years of age to enter or remain in a place where unlawful activity involving controlled substances is maintained or conducted[.]"
[2]  Defendant also argues that the condition was imposed without the court having made findings to support its appropriateness. That is incorrect. The remarks made by the court and the facts adduced at the sentencing hearing serve as "an adequate record to show that the conditions of probation are appropriate." State v. Martin, 282 Or. 583, 580 P.2d 536 (1978). No additional factual record was needed. See State v. Quackenbush, 113 Or.App. 263, 266, 832 P.2d 1236 (1992).
[3]  Defendant also has a previous conviction for a drug offense in conjunction with her husband.
