Skip to content

Commit

Permalink
add nil check for appProfile in ApplicationProfileCacheImpl
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Bertschy <[email protected]>
  • Loading branch information
matthyx committed Feb 14, 2025
1 parent 8a11c73 commit cb56482
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ func (ap *ApplicationProfileCacheImpl) handleUserManagedProfile(appProfile *v1be

// indexContainerCallStacks builds the search index for a container's call stacks and removes them from the profile
func (ap *ApplicationProfileCacheImpl) indexContainerCallStacks(containerID, containerName string, appProfile *v1beta1.ApplicationProfile) {
if appProfile == nil {
logger.L().Warning("ApplicationProfileCacheImpl - application profile is nil",
helpers.String("containerID", containerID),
helpers.String("containerName", containerName))
return
}

// Initialize container index if needed
if !ap.containerCallStacks.Has(containerID) {
ap.containerCallStacks.Set(containerID, &ContainerCallStackIndex{
Expand Down

0 comments on commit cb56482

Please sign in to comment.