try fix crash

This commit is contained in:
arm64v8a
2022-08-17 16:04:43 +08:00
parent f840099803
commit 52fe61b1ca
4 changed files with 5 additions and 6 deletions

View File

@@ -1 +1 @@
98f91bf391bc16d6c5c825b406b5bdd82f06870e 1951fa09a89e8e1f19abfbd0d91478a3e5e311a7

View File

@@ -1 +1 @@
b827a53549f0c79311bb8ac6e01bedff5a19a91e 9ac86c30c6190a358da2c83b2b6c093df45af919

View File

@@ -378,14 +378,14 @@ MainWindow::MainWindow(QWidget *parent)
for (int retry = 0; retry < 10; retry++) { for (int retry = 0; retry < 10; retry++) {
showLog("Starting nekoray core " + starting_info + "\n"); showLog("Starting nekoray core " + starting_info + "\n");
core_process = new QProcess; auto core_process = new QProcess;
core_process_show_stderr = false; core_process_show_stderr = false;
connect(core_process, &QProcess::readyReadStandardOutput, this, connect(core_process, &QProcess::readyReadStandardOutput, this,
[&]() { [=]() {
showLog(core_process->readAllStandardOutput().trimmed()); showLog(core_process->readAllStandardOutput().trimmed());
}); });
connect(core_process, &QProcess::readyReadStandardError, this, connect(core_process, &QProcess::readyReadStandardError, this,
[&]() { [=]() {
auto log = core_process->readAllStandardError().trimmed(); auto log = core_process->readAllStandardError().trimmed();
if (core_process_show_stderr) { if (core_process_show_stderr) {
showLog(log); showLog(log);

View File

@@ -120,7 +120,6 @@ private:
// //
bool core_process_killed = false; bool core_process_killed = false;
bool core_process_show_stderr = false; bool core_process_show_stderr = false;
QProcess *core_process = nullptr;
qint64 vpn_pid = 0; qint64 vpn_pid = 0;
QFileSystemWatcher *watcher = nullptr; QFileSystemWatcher *watcher = nullptr;
// //