Avoid dereferencing a null field
Merge pull request #340 from nbougalis/nullderef

Avoid dereferencing a null field