Skip to content

Commit

Permalink
fix: protect potential nil panic (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirdavid1 authored Jan 2, 2025
1 parent c20fa2c commit 56f3f13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion odiglet/pkg/kube/runtime_details/inspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func runtimeInspection(ctx context.Context, pods []corev1.Pod, ignoredContainers
LibCType: libcType,
}

if criClient != nil { // CriClient passed as nil in cases that will be deprecated in the future [InstrumentedApplication]
if criClient != nil && inspectProc != nil { // CriClient passed as nil in cases that will be deprecated in the future [InstrumentedApplication]
procEnvVars := inspectProc.Environments.OverwriteEnvs
updateRuntimeDetailsWithContainerRuntimeEnvs(ctx, *criClient, pod, container, programLanguageDetails, &resultsMap, procEnvVars)
}
Expand Down

0 comments on commit 56f3f13

Please sign in to comment.