118,119c118,120
< bpred = cpu.branchPred if cpu and not isNullPointer(cpu.branchPred) \
< else None
---
> bpred = getattr(cpu, "branchPred", None) if cpu else None
> if bpred is not None and isNullPointer(bpred):
> bpred = None