Protect nullptr dereference and fix counters (follow !3188)
This should fix the HLT2 pp_thor throughput test that is failing since !3188 (merged) was merged.
Edited by Rosen Matev
This should fix the HLT2 pp_thor throughput test that is failing since !3188 (merged) was merged.