Remove null pointer dereferences which caused ASSERTion failure on real hardware.