Permalink
Browse files

Merge pull request #249 from adobe/glenn/crash-on-refresh

Fix potential crash when reloading Brackets
  • Loading branch information...
2 parents 8f31d92 + daaa041 commit f791fb90c9d8407ebda2b1753a5ee32b17eb404e @redmunds redmunds committed May 23, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 appshell/client_app.cpp
View
@@ -161,7 +161,10 @@ class AppShellExtensionHandler : public CefV8Handler {
// Pass all messages to the browser process. Look in appshell_extensions.cpp for implementation.
CefRefPtr<CefBrowser> browser =
CefV8Context::GetCurrentContext()->GetBrowser();
- ASSERT(browser.get());
+ if (!browser.get()) {
+ // If we don't have a browser, we can't handle the command.
+ return false;
+ }
CefRefPtr<CefProcessMessage> message =
CefProcessMessage::Create(name);
CefRefPtr<CefListValue> messageArgs = message->GetArgumentList();

0 comments on commit f791fb9

Please sign in to comment.