Skip to content

Commit

Permalink
Merge pull request #479 from kubescape/bugfix/panic-empty-profile
Browse files Browse the repository at this point in the history
Fixing panic when application profile is nil and being passed to inde…
  • Loading branch information
amitschendel authored Feb 11, 2025
2 parents ee88fa6 + bb09be7 commit ad64250
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,11 @@ func (ap *ApplicationProfileCacheImpl) addPod(obj runtime.Object) {
ap.slugToAppProfile.Set(uniqueSlug, appProfile)
}

ap.indexContainerCallStacks(container, ap.containerToName.Get(container), ap.slugToAppProfile.Get(uniqueSlug))
appProfile := ap.slugToAppProfile.Get(uniqueSlug)
state := ap.slugToState.Get(uniqueSlug)
if appProfile != nil && state.status == helpersv1.Completed {
ap.indexContainerCallStacks(container, ap.containerToName.Get(container), appProfile)
}
}

}
Expand Down

0 comments on commit ad64250

Please sign in to comment.