Fix a potential null pointer exception
Merge remote-tracking branch 'antox/master'