(Lakka) fix segfault.
Merge pull request #1105 from aliaspider/master

(Lakka) fix segfault.