Fix crash in single instance forcing.

Local server communication is allowed before Messenger constructor.
This commit is contained in:
John Preston 2017-07-05 21:45:46 +03:00
parent 7013a0dfef
commit 8202a1633b

View file

@ -242,6 +242,7 @@ void Application::newInstanceConnected() {
}
void Application::readClients() {
// This method can be called before Messenger is constructed.
QString startUrl;
QStringList toSend;
for (LocalClients::iterator i = _localClients.begin(), e = _localClients.end(); i != e; ++i) {
@ -286,7 +287,9 @@ void Application::readClients() {
if (!startUrl.isEmpty()) {
cSetStartUrl(startUrl);
}
Messenger::Instance().checkStartUrl();
if (auto messenger = Messenger::InstancePointer()) {
messenger->checkStartUrl();
}
}
void Application::removeClients() {