From c06f6d7aebbf84ab3cf80880572fa1b5a6ac7ec3 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 4 Feb 2016 13:17:37 +0100 Subject: [PATCH] Fix crash in ConfigItem::RunWithActivationContext fixes #11085 --- lib/config/configitem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index a6c959e58..8a14de5aa 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -521,8 +521,6 @@ bool ConfigItem::CommitItems(const ActivationContext::Ptr& context, WorkQueue& u return false; } - ASSERT(newItems.size() > 0); - ApplyRule::CheckMatches(); /* log stats for external parsers */ @@ -593,6 +591,9 @@ bool ConfigItem::RunWithActivationContext(const Function::Ptr& function) { ActivationScope scope; + if (!function) + BOOST_THROW_EXCEPTION(ScriptError("'function' argument must not be null.")); + { ScriptFrame frame; function->Invoke(); -- 2.40.0