Fixing case of an event handler having no bodies. To sqash later.

This commit is contained in:
Robin Sommer 2011-02-21 14:13:06 -08:00
parent c0cd62a5a5
commit b98d5adcd5

View file

@ -271,6 +271,13 @@ Val* BroFunc::Call(val_list* args, Frame* parent) const
#ifdef PROFILE_BRO_FUNCTIONS
DEBUG_MSG("Function: %s\n", id->Name());
#endif
if ( ! bodies.size() )
{
// Can only happen for events.
assert(IsEvent());
return 0 ;
}
SegmentProfiler(segment_logger, location);
Frame* f = new Frame(frame_size, this, args);