Skip to content

Commit

Permalink
Bugfix: If no sinks are registered, an exception will happen triggere…
Browse files Browse the repository at this point in the history
…d by selecting one via name.
  • Loading branch information
BlueAndi committed Jan 24, 2024
1 parent 43b3b8a commit fbc3f37
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions lib/Utilities/src/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,16 @@ bool Logging::selectSink(const String& name)

while((MAX_SINKS > index) && (false == status))
{
if (m_sinks[index]->getName() == name)
if (nullptr != m_sinks[index])
{
m_selectedSink = m_sinks[index];
status = true;
}
else
{
++index;
if (m_sinks[index]->getName() == name)
{
m_selectedSink = m_sinks[index];
status = true;
}
}

++index;
}

return status;
Expand Down

0 comments on commit fbc3f37

Please sign in to comment.