[[ Bugfix 12502 ]] Fix a null-pointer deref in PDF printing
Merge pull request #767 from runrevfraser/bugfix-12502

Bugfix 12502