Fix crash in debug code for matrix uri handler

fixes #776
fixes #590
This commit is contained in:
Nicolas Werner 2021-11-04 23:10:03 +01:00
parent 8f64f0bb1c
commit 410ec00848
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -174,7 +174,7 @@ main(int argc, char *argv[])
SingleApplication::Mode::ExcludeAppVersion |
SingleApplication::Mode::SecondaryNotification,
100,
userdata);
userdata == "default" ? "" : userdata);
QCommandLineParser parser;
parser.addHelpOption();
@ -199,7 +199,8 @@ main(int argc, char *argv[])
// This check needs to happen _after_ process(), so that we actually print help for --help when
// Nheko is already running.
if (app.isSecondary()) {
nhlog::ui()->info("Sending Matrix URL to main application: {}", matrixUri.toStdString());
std::cout << "Sending Matrix URL to main application: " << matrixUri.toStdString()
<< std::endl;
// open uri in main instance
app.sendMessage(matrixUri.toUtf8());
return 0;