I did it wrooong
Merge pull request #391 from Mystler/fix

Fix null dereference issue