[[ Bugfix 13480 ]] Fix a potential nil pointer crash
Merge pull request #1200 from runrevfraser/bugfix-13480

[[ Bugfix 13480 ]] Fix a potential nil pointer crash