diff --git a/bazaar/Uniq/Posix.cpp b/bazaar/Uniq/Posix.cpp index 1cc588c55..45c7237f5 100644 --- a/bazaar/Uniq/Posix.cpp +++ b/bazaar/Uniq/Posix.cpp @@ -8,8 +8,10 @@ NAMESPACE_UPP bool Uniq::SendCmdLine(int pipe) { char buf[256]; + Vectorv; + v.Clear(); fd_set rfds; struct timeval tv; FD_ZERO(&rfds); @@ -40,7 +42,7 @@ bool Uniq::SendCmdLine(int pipe) } fclose(f); // posts the callback to handle new instance's command line - PostCallback([=, &v]() { WhenInstance(v); } ); + PostCallback([=, v{pick(v)}]() { WhenInstance(v); } ); return true; } diff --git a/bazaar/Uniq/Windows.cpp b/bazaar/Uniq/Windows.cpp index 20fbb8e89..c1c2860ac 100644 --- a/bazaar/Uniq/Windows.cpp +++ b/bazaar/Uniq/Windows.cpp @@ -106,7 +106,7 @@ bool Uniq::SendCmdLine(void) // disconnects from client DisconnectNamedPipe(pipe); - PostCallback([=, &v]() { WhenInstance(v); } ); + PostCallback([=, v{pick(v)}]() { WhenInstance(v); } ); return true; }