diff --git a/src/main.cpp b/src/main.cpp index 73a68c743..3701bb29c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -217,7 +217,11 @@ int main(int argc, char *argv[]) { #endif a.setQuitOnLastWindowClosed(false); - a.isRunning(); // Otherwise QtLocalPeer won't lock the lockfile :S + + // Do this check again because another instance might have started by now + if (a.isRunning() && a.sendMessage(options.Serialize(), 5000)) { + return 0; + } #ifndef Q_OS_DARWIN // Gnome on Ubuntu has menu icons disabled by default. I think that's a bad