From 480beeefbd4ded9cdd2603c1e817dc4cb8f0a7f5 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Wed, 5 Jun 2024 17:39:44 +0200 Subject: [PATCH] hook: initialize signals with an empty list This created issues when using hooks without a SuperNode. Some code assumes signals != nullptr. Signed-off-by: Niklas Eiling --- lib/hook.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/hook.cpp b/lib/hook.cpp index e163c7cf1..61a6f59bc 100644 --- a/lib/hook.cpp +++ b/lib/hook.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -26,7 +27,7 @@ Hook::Hook(Path *p, Node *n, int fl, int prio, bool en) ? State::CHECKED : State::INITIALIZED), // We dont need to parse builtin hooks flags(fl), priority(prio), enabled(en), path(p), node(n), - config(nullptr) {} + signals(std::make_shared()), config(nullptr) {} void Hook::prepare(SignalList::Ptr sigs) { assert(state == State::CHECKED);