X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FServerSocket.cpp;h=3d73a67ed6d955c08318323357856f5ec10aa8f9;hb=6de3c19fd63f810eed90ef3bc4469faf28e949c2;hp=7b9d6df5af71c81d885c36c29045127a2964ae47;hpb=8995a8387a03361b6a7ff44b447a90a6187b1a14;p=lyx.git diff --git a/src/ServerSocket.cpp b/src/ServerSocket.cpp index 7b9d6df5af..3d73a67ed6 100644 --- a/src/ServerSocket.cpp +++ b/src/ServerSocket.cpp @@ -41,7 +41,6 @@ using namespace std; using namespace lyx::support; - namespace lyx { // Address is the unix address for the socket. @@ -125,8 +124,10 @@ void ServerSocket::serverCallback() // if the connection has been closed void ServerSocket::dataCallback(int fd) { - shared_ptr client = clients[fd]; - + map >::const_iterator it = clients.find(fd); + if (it == clients.end()) + return; + shared_ptr client = it->second; string line; size_t pos; bool saidbye = false;