Index: chrome/test/automation/proxy_launcher.cc |
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc |
index 44c636df06600e54673e39c84e4d60a639337a0b..6667f510e900d7cbffd7a24cb6849578c6e87f55 100644 |
--- a/chrome/test/automation/proxy_launcher.cc |
+++ b/chrome/test/automation/proxy_launcher.cc |
@@ -218,7 +218,7 @@ bool ProxyLauncher::LaunchAnotherBrowserBlockUntilClosed( |
void ProxyLauncher::QuitBrowser() { |
// If we have already finished waiting for the browser to exit |
// (or it hasn't launched at all), there's nothing to do here. |
- if (process_ == base::kNullProcessHandle) |
+ if (process_ == base::kNullProcessHandle || !automation_proxy_.get()) |
return; |
if (SESSION_ENDING == shutdown_type_) { |
@@ -288,7 +288,7 @@ void ProxyLauncher::QuitBrowser() { |
void ProxyLauncher::TerminateBrowser() { |
// If we have already finished waiting for the browser to exit |
// (or it hasn't launched at all), there's nothing to do here. |
- if (process_ == base::kNullProcessHandle) |
+ if (process_ == base::kNullProcessHandle || !automation_proxy_.get()) |
return; |
base::TimeTicks quit_start = base::TimeTicks::Now(); |