Especially when they preach about how women are supposed to dress, and how their "immodesty" (which usually means not wearing a long dress or skirt) makes men struggle with their thought life.
So either the pastor does not mind having a naughty thought life, or his preaching is very wrong.