Commit 6737ca53 authored by con's avatar con
Browse files

Add some sanity checking.

parent 3e7d9b60
......@@ -1347,6 +1347,8 @@ EditorManager::ReadOnlyAction
MakeWritableResult
EditorManager::makeEditorWritable(IEditor *editor)
{
if (!editor || !editor->file())
return Failed;
QString directory = QFileInfo(editor->file()->fileName()).absolutePath();
IVersionControl *versionControl = m_d->m_core->vcsManager()->findVersionControlForDirectory(directory);
IFile *file = editor->file();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment