Index: mash/app_driver/app_driver.cc |
diff --git a/mash/app_driver/app_driver.cc b/mash/app_driver/app_driver.cc |
index b06b25863ed8c456bc48d164d06c8deafef27a63..19de4875d0cbb29437f3985a40c2b531f971812b 100644 |
--- a/mash/app_driver/app_driver.cc |
+++ b/mash/app_driver/app_driver.cc |
@@ -97,7 +97,8 @@ bool AppDriver::OnConnect(shell::Connection* connection) { |
bool AppDriver::OnStop() { |
// Prevent the code in AddAccelerators() from keeping this app alive. |
- binding_.set_connection_error_handler(base::Bind(&DoNothing)); |
+ if (binding_.is_bound()) |
+ binding_.set_connection_error_handler(base::Bind(&DoNothing)); |
return true; |
} |