[#2212] CID49414:

Previous commit to fix this issue errantly checked the pointer for null
instead of the pointer it points to for null