This patch adds an exception handling to check whether the main port is
nullptr or NOT. If the main port ptr is already deleted, the proxy process
will have crashed.
Change-Id: I0f6a97b2fcdbc715fae61feafe8db551d4f01cd6
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
}
void Proxy::DisconnectPort() {
- DebugPort::GetInst().RemoveSession(main_port_->GetFd());
- main_port_.reset();
+ if (main_port_.get() != nullptr) {
+ DebugPort::GetInst().RemoveSession(main_port_->GetFd());
+ main_port_.reset();
+ }
}
void Proxy::SetRealAppId(const std::string& alias_appid) {