fix: exit error bug.
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
#include "Control/LogControl.h"
|
||||
|
||||
static LogPrint* logPrint = nullptr;
|
||||
static QMutex logMut;
|
||||
|
||||
frelayGUI::frelayGUI(QWidget* parent) : QMainWindow(parent), ui(new Ui::frelayGUI)
|
||||
{
|
||||
@@ -28,9 +27,7 @@ frelayGUI::frelayGUI(QWidget* parent) : QMainWindow(parent), ui(new Ui::frelayGU
|
||||
|
||||
frelayGUI::~frelayGUI()
|
||||
{
|
||||
QMutexLocker locker(&logMut);
|
||||
delete ui;
|
||||
logPrint = nullptr;
|
||||
}
|
||||
|
||||
void frelayGUI::InitControl()
|
||||
@@ -93,9 +90,7 @@ void frelayGUI::ControlMsgHander(QtMsgType type, const QMessageLogContext& conte
|
||||
{
|
||||
Q_UNUSED(context);
|
||||
|
||||
QMutexLocker locker(&logMut);
|
||||
|
||||
if (!logPrint) {
|
||||
if (!qApp || !qobject_cast<frelayGUI*>(qApp->activeWindow())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user