cross one's mind

[cross one's mind] or [pass through one's mind] {v. phr.} To be a sudden or passing thought; be thought of by someone; come to your mind; occur to you.

At first Bob was puzzled by Virginia's waving, but then it crossed his mind that she was trying to tell him something.

When Jane did not come home by midnight, many terrible fears passed through Mother's mind.