Skip to content
Snippets Groups Projects
Commit bc011481 authored by Leandro Melo's avatar Leandro Melo
Browse files

Prevent dereferencing an invalid file pointer in the plain text editor.

parent 7f9a448e
Branches
Tags
No related merge requests found
...@@ -164,6 +164,7 @@ void PlainTextEditor::setTabSettings(const TextEditor::TabSettings &ts) ...@@ -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()));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment