Fix nullpointer
Merge pull request #2081 from erwinwinder/master

Fix nullpointer