diff --git a/src/Func.cc b/src/Func.cc index f398425216..d9c3aa7bdf 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -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);