forked from qt-creator/qt-creator
Prevent dereferencing an invalid file pointer in the plain text editor.
This commit is contained in:
@@ -164,6 +164,7 @@ void PlainTextEditor::setTabSettings(const TextEditor::TabSettings &ts)
|
|||||||
|
|
||||||
void PlainTextEditor::configure()
|
void PlainTextEditor::configure()
|
||||||
{
|
{
|
||||||
|
if (file())
|
||||||
configure(Core::ICore::instance()->mimeDatabase()->findByFile(file()->fileName()));
|
configure(Core::ICore::instance()->mimeDatabase()->findByFile(file()->fileName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user