Handle an error that was previously ignored
Formatting
Formatting
Merge pull request #587 from wallyworld/nil-pointer-fixes

Nil pointer fixes

Fixes: https://bugs.launchpad.net/bugs/1358585

Add missing error handling.