1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

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 <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
Niklas Eiling 2024-06-05 17:39:44 +02:00 committed by Niklas Eiling
parent d992d2a923
commit 480beeefbd

View file

@ -12,6 +12,7 @@
#include <villas/node/config.hpp>
#include <villas/node/exceptions.hpp>
#include <villas/path.hpp>
#include <villas/signal_list.hpp>
#include <villas/timing.hpp>
#include <villas/utils.hpp>
@ -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<SignalList>()), config(nullptr) {}
void Hook::prepare(SignalList::Ptr sigs) {
assert(state == State::CHECKED);