Fixed CodeCL warnings

This commit is contained in:
emeric
2023-10-11 11:29:37 +02:00
parent 23415a6c10
commit 961b52f124
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -149,8 +149,7 @@ namespace API::Subsonic
trackResponse.setAttribute("starred", StringUtils::toISO8601String(dateTime));
// Report the first GENRE for this track
ClusterType::pointer genreClusterType{ ClusterType::find(dbSession, "GENRE") };
if (genreClusterType)
if (ClusterType::pointer genreClusterType{ ClusterType::find(dbSession, "GENRE") })
{
auto clusters{ track->getClusterGroups({genreClusterType}, 1) };
if (!clusters.empty() && !clusters.front().empty())