Skip to content
Snippets Groups Projects
Commit c8f8bbf7 authored by Rider Linden's avatar Rider Linden
Browse files

MAINT-6521: A compare against a static const empty string causes segfault in...

MAINT-6521: A compare against a static const empty string causes segfault in integration tests on Mac and Linux.  Use empty() test instead.
parent d161651c
No related branches found
No related tags found
No related merge requests found
...@@ -320,7 +320,7 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL ...@@ -320,7 +320,7 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
// if the supplied name is empty we are not interested in the ordering mechanism // if the supplied name is empty we are not interested in the ordering mechanism
// and can bypass attempting to find the optimal location to insert the new // and can bypass attempting to find the optimal location to insert the new
// listener. We'll just tack it on to the end. // listener. We'll just tack it on to the end.
if (name != ANONYMOUS) if (!name.empty()) // should be the same as testing against ANONYMOUS
{ {
// Check for duplicate name before connecting listener to mSignal // Check for duplicate name before connecting listener to mSignal
ConnectionMap::const_iterator found = mConnections.find(name); ConnectionMap::const_iterator found = mConnections.find(name);
...@@ -464,7 +464,7 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL ...@@ -464,7 +464,7 @@ LLBoundListener LLEventPump::listen_impl(const std::string& name, const LLEventL
// connect it. // connect it.
LLBoundListener bound = mSignal->connect(nodePosition, listener); LLBoundListener bound = mSignal->connect(nodePosition, listener);
if (name != ANONYMOUS) if (!name.empty())
{ // note that we are not tracking anonymous listeners here either. { // note that we are not tracking anonymous listeners here either.
// This means that it is the caller's responsibility to either assign // This means that it is the caller's responsibility to either assign
// to a TempBoundListerer (scoped_connection) or manually disconnect // to a TempBoundListerer (scoped_connection) or manually disconnect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment