Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #249 from adobe/glenn/crash-on-refresh
Browse files Browse the repository at this point in the history
Fix potential crash when reloading Brackets
  • Loading branch information
redmunds committed May 23, 2013
2 parents 4d4b0b3 + 29262a7 commit d648b21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion appshell/client_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d648b21

Please sign in to comment.