Protect against detached browser.
Merge pull request #249 from adobe/glenn/crash-on-refresh

Fix potential crash when reloading Brackets