From: Kazumasa Mitsunari Date: Sat, 8 Sep 2018 06:30:55 +0000 (+0900) Subject: Return nullptr if client is not found X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=0b2c927e6606c0fbae889fea7085a9af12d15714;p=apps%2Fagl-service-windowmanager-2017.git Return nullptr if client is not found Signed-off-by: Kazumasa Mitsunari --- diff --git a/src/applist.cpp b/src/applist.cpp index 922a89e..888ab71 100644 --- a/src/applist.cpp +++ b/src/applist.cpp @@ -140,7 +140,14 @@ void AppList::removeSurface(unsigned surface){ */ shared_ptr AppList::lookUpClient(const string &appid) { - return this->app2client.at(appid); + if(this->app2client.count(appid) != 0) + { + return this->app2client.at(appid); + } + else + { + return nullptr; + } } /**