Problem
Callers to intern/cycles/kernel/bvh/bvh.h:scene_intersect_local() do not always supply a LocalIntersection *local_isect pointer, and over time NULL pointer sanity checks have been wrapped around this pointer wherever it appears, most recently via rBca72ff599a96b64e by @Brecht Van Lommel (brecht).
Patch
This patch follows the lead of the cited patch and similary wraps a sanity check around local_isect at line 326 There are curious facets in the blend file furnished by the task's reporter, @Voldemars Pauls Dzenis (lynxon), which give rise to the caller's Ray object containing NaN's, which induces scene_intersect_valid(ray) to return false, a fairly rare combination of events. I surmise that this is why the unwrapped, unchecked pointer has gone unnoticed for awhile.
Details
See T77106.