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
No related branches found
No related tags found
No related merge requests found
......@@ -164,7 +164,8 @@ void PlainTextEditor::setTabSettings(const TextEditor::TabSettings &ts)
void PlainTextEditor::configure()
{
configure(Core::ICore::instance()->mimeDatabase()->findByFile(file()->fileName()));
if (file())
configure(Core::ICore::instance()->mimeDatabase()->findByFile(file()->fileName()));
}
void PlainTextEditor::configure(const Core::MimeType &mimeType)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment