Fixed error caused by NoneType object access
Merge pull request #1 from blha303/patch-1

Fixed error caused by NoneType object access