]> git.lyx.org Git - lyx.git/blobdiff - src/Server.cpp
fix #9826: Outline disclosure of subsection content disappears one second after
[lyx.git] / src / Server.cpp
index 1de758a5f46bd1b9507c9e2ad9b213d9a015c550..1a66682bc40f9e95db5cfc851fd38bb78457b299 100644 (file)
@@ -136,7 +136,7 @@ DWORD WINAPI pipeServerWrapper(void * arg)
 
 
 LyXComm::LyXComm(string const & pip, Server * cli, ClientCallbackfct ccb)
-       : pipename_(pip), client_(cli), clientcb_(ccb), stopserver_(0)
+       : stopserver_(0), pipename_(pip), client_(cli), clientcb_(ccb)
 {
        for (int i = 0; i < MAX_PIPES; ++i) {
                event_[i] = 0;
@@ -209,7 +209,7 @@ bool LyXComm::pipeServer()
 
                // Determine which pipe instance completed the operation.
                i = wait - WAIT_OBJECT_0;
-               LASSERT(i >= 0 && i <= MAX_PIPES, /**/);
+               LASSERT(i <= MAX_PIPES, /**/);
 
                // Check whether we were waked up for stopping the pipe server.
                if (i == MAX_PIPES)
@@ -878,7 +878,7 @@ void LyXComm::endPipe(int & fd, string const & filename, bool write)
                       << '\n' << strerror(errno) << endl;
        }
 
-       if (FileName(filename).removeFile() < 0) {
+       if (!FileName(filename).removeFile()) {
                lyxerr << "LyXComm: Could not remove pipe " << filename
                       << '\n' << strerror(errno) << endl;
        }