Fix crash when closing Chrome without a callback function in place

This is for https://github.com/adobe/brackets/issues/5893