Core/Script:
Added missing NULL pointer check
Merge pull request #10874 from zorix/PR1

Core/Script: