aboutsummaryrefslogtreecommitdiffstats
path: root/src/applist.cpp
diff options
context:
space:
mode:
authorKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-09-08 15:30:55 +0900
committerKazumasa Mitsunari <knimitz@witz-inc.co.jp>2018-09-08 15:30:55 +0900
commit0b2c927e6606c0fbae889fea7085a9af12d15714 (patch)
tree7444fe866da1e2847a6d58575ab6c4a121eaf246 /src/applist.cpp
parent2f2639950dec4b97984fd6776a850e5d4703ef52 (diff)
Return nullptr if client is not found
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
Diffstat (limited to 'src/applist.cpp')
-rw-r--r--src/applist.cpp9
1 files changed, 8 insertions, 1 deletions
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<WMClient> AppList::lookUpClient(const string &appid)
{
- return this->app2client.at(appid);
+ if(this->app2client.count(appid) != 0)
+ {
+ return this->app2client.at(appid);
+ }
+ else
+ {
+ return nullptr;
+ }
}
/**