Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #373 from fungl164/fungl164/chrome-live-osx-2

Fix crash when closing Chrome without a callback function in place
  • Loading branch information...
commit b8b277b6acb330f4a04b0c3a1a5bdf23b0f1076c 2 parents 7ed6c3e + f0daa35
@redmunds redmunds authored
Showing with 11 additions and 7 deletions.
  1. +11 −7 appshell/appshell_extensions_mac.mm
View
18 appshell/appshell_extensions_mac.mm
@@ -151,19 +151,23 @@ void SetLiveBrowserPid(int pid)
void LiveBrowserMgrMac::CloseLiveBrowserFireCallback(int valToSend)
{
- CefRefPtr<CefListValue> responseArgs = m_closeLiveBrowserCallback->GetArgumentList();
-
// kill the timers
CloseLiveBrowserKillTimers();
// Stop listening for ws shutdown notifications
RemoveWorkspaceNotifications();
- // Set common response args (callbackId and error)
- responseArgs->SetInt(1, valToSend);
-
- // Send response
- m_browser->SendProcessMessage(PID_RENDERER, m_closeLiveBrowserCallback);
+ // Prepare response
+ if (m_closeLiveBrowserCallback) {
+
+ CefRefPtr<CefListValue> responseArgs = m_closeLiveBrowserCallback->GetArgumentList();
+
+ // Set common response args (callbackId and error)
+ responseArgs->SetInt(1, valToSend);
+
+ // Send response
+ m_browser->SendProcessMessage(PID_RENDERER, m_closeLiveBrowserCallback);
+ }
// Clear state
m_closeLiveBrowserCallback = NULL;
Please sign in to comment.
Something went wrong with that request. Please try again.