mirror of https://github.com/procxx/kepka.git
Fix crash in single instance forcing.
Local server communication is allowed before Messenger constructor.
This commit is contained in:
parent
7013a0dfef
commit
8202a1633b
|
@ -242,6 +242,7 @@ void Application::newInstanceConnected() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::readClients() {
|
void Application::readClients() {
|
||||||
|
// This method can be called before Messenger is constructed.
|
||||||
QString startUrl;
|
QString startUrl;
|
||||||
QStringList toSend;
|
QStringList toSend;
|
||||||
for (LocalClients::iterator i = _localClients.begin(), e = _localClients.end(); i != e; ++i) {
|
for (LocalClients::iterator i = _localClients.begin(), e = _localClients.end(); i != e; ++i) {
|
||||||
|
@ -286,7 +287,9 @@ void Application::readClients() {
|
||||||
if (!startUrl.isEmpty()) {
|
if (!startUrl.isEmpty()) {
|
||||||
cSetStartUrl(startUrl);
|
cSetStartUrl(startUrl);
|
||||||
}
|
}
|
||||||
Messenger::Instance().checkStartUrl();
|
if (auto messenger = Messenger::InstancePointer()) {
|
||||||
|
messenger->checkStartUrl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::removeClients() {
|
void Application::removeClients() {
|
||||||
|
|
Loading…
Reference in New Issue