Fix crash when gd-script _init fail
Merge pull request #987 from sanikoyes/Pr-crash-in-scrip-init

Fix crash when gd-script _init fail