[NSM GD] Fixed a possible crash.