forked from qt-creator/qt-creator
Core: Avoid accessing nullptr
The output window does not own the formatter but in case of an erroenous ramp down of the run control it may miss the destruction of the run control. This had led to strange nullptr accesses to the formatter when clicking into the respective application output pane afterwards. Change-Id: I16fdf0e68f1f02537495436a82c9888c53c78345 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
#include <utils/synchronousprocess.h>
|
#include <utils/synchronousprocess.h>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
#include <QPointer>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QTextBlock>
|
#include <QTextBlock>
|
||||||
@@ -58,7 +59,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
IContext *outputWindowContext = nullptr;
|
IContext *outputWindowContext = nullptr;
|
||||||
Utils::OutputFormatter *formatter = nullptr;
|
QPointer<Utils::OutputFormatter> formatter;
|
||||||
QString settingsKey;
|
QString settingsKey;
|
||||||
|
|
||||||
bool enforceNewline = false;
|
bool enforceNewline = false;
|
||||||
|
Reference in New Issue
Block a user