Fix null dereference of pointers
Merge pull request #88 from aleno/master

Fix null dereference of pointers