Code: Prevent from NullReferenceException.(#1190)
Merge pull request #1278 from am11/master

Code: Prevent from NullReferenceException (#1190)