From ae9705561c415c64ce8fa91845148f75ca5fb17c Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Tue, 14 Oct 2014 17:31:04 +0200 Subject: [PATCH] Hooks - Throw exception instead of segfaulting for on-add hooks not adhering to the specs. More work needed. --- src/Hooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hooks.cpp b/src/Hooks.cpp index f15b952ff..dee6da11f 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -256,7 +256,7 @@ void Hooks::onAdd (std::vector & changes) if (_debug >= 1) context.debug ("Hooks: Calling " + *i); - std::string input = changes[0].composeJSON (); + std::string input = changes.at(0).composeJSON (); if (_debug >= 2) context.debug ("Hook input: " + input);