Interesting point.
I imagine the definititions of trespass is having to break in, or a sign denying entry. Merely wandering into a room full of people might not be considerered trespassing, unless he knew beforehand he was not permitted entry. Given such functions usually have security or attendants to prevent freeloaders, I think it will be hard to prove he trespassed. his defence may well be that he was pemitted entry by implication.
And seriously, how could someone not notice a person carrying a pie? Its not as if he could have concealed it.