aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythoneditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python/pythoneditor.cpp')
-rw-r--r--src/plugins/python/pythoneditor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/python/pythoneditor.cpp b/src/plugins/python/pythoneditor.cpp
index 64ad03052d7..5854b92d3de 100644
--- a/src/plugins/python/pythoneditor.cpp
+++ b/src/plugins/python/pythoneditor.cpp
@@ -297,7 +297,8 @@ PythonDocument::PythonDocument()
void PythonDocument::updateCurrentPython()
{
- updatePython(detectPython(filePath()));
+ if (Core::DocumentModel::entryForDocument(this))
+ updatePython(detectPython(filePath()));
}
void PythonDocument::updatePython(const FilePath &python)