Merge pull request #1156 from scunz/another_testcrash Reset global variable to NULL after free'ing resource