diff options
author | Max Kellermann <max@duempel.org> | 2014-01-26 01:17:49 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-26 01:17:49 +0100 |
commit | 642be502c0e4767568347ff82cde561b40f93d25 (patch) | |
tree | 27d53d7733aea6650fc72bce8f7f5cba193697cb /src/command/NeighborCommands.cxx | |
parent | 5c4a42caa088335868342b25a834962cbc0d08a2 (diff) |
NeighborCommands: convert assertion to runtime check
Diffstat (limited to 'src/command/NeighborCommands.cxx')
-rw-r--r-- | src/command/NeighborCommands.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/command/NeighborCommands.cxx b/src/command/NeighborCommands.cxx index e68e8ef15..ee88c7935 100644 --- a/src/command/NeighborCommands.cxx +++ b/src/command/NeighborCommands.cxx @@ -41,7 +41,11 @@ CommandResult handle_listneighbors(Client &client, gcc_unused int argc, gcc_unused char *argv[]) { - assert(instance->neighbors != nullptr); + if (instance->neighbors == nullptr) { + command_error(client, ACK_ERROR_UNKNOWN, + "No neighbor plugin configured"); + return CommandResult::ERROR; + } const auto neighbors = instance->neighbors->GetList(); for (const auto &i : neighbors) |