Fix segfault on exit for OSX
Merge pull request #753 from hgaiser/indigo-devel

Fix segfault on exit for OSX