Fix potential usage of a null pointer

See merge request !4720 (merged) (cherry picked from commit 456ee1fa)

Merge request reports

Loading