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

Fix potential crash when reloading Brackets #249

Merged
merged 1 commit into from
May 23, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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