From e433401fb883584d32b9b8159370ee57823b01bf Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 2 Jan 2019 20:21:21 +0000 Subject: Fix a crash when trying to use ROUTE_TYPE_MESSAGE with no message. --- src/modules/m_spanningtree/utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree/utils.cpp') diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 42eb80de5..1f2ed9c90 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -359,7 +359,9 @@ void SpanningTreeUtilities::SendChannelMessage(const std::string& prefix, Channe msg.push_raw(' '); if (status != 0) msg.push_raw(status); - msg.push_raw(target->name).push_last(text); + msg.push_raw(target->name); + if (!text.empty()) + msg.push_last(text); TreeSocketSet list; this->GetListOfServersForChannel(target, list, status, exempt_list); -- cgit v1.3.1-10-gc9f91