Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
14f33bf9
Commit
14f33bf9
authored
Jun 15, 2021
by
Waqar Ahmed
Browse files
Fix closing a doc causes a crash sometimes
parent
d5aeee56
Changes
2
Show whitespace changes
Inline
Side-by-side
kate/katedocmanager.cpp
View file @
14f33bf9
...
...
@@ -242,13 +242,10 @@ bool KateDocManager::closeDocuments(const QList<KTextEditor::Document *> &docume
// really delete the document and its infos
m_docInfos
.
erase
(
doc
);
auto
it
=
std
::
find
(
m_docList
.
begin
(),
m_docList
.
end
(),
doc
);
if
(
it
!=
m_docList
.
end
())
{
delete
*
it
;
delete
m_docList
.
takeAt
(
m_docList
.
indexOf
(
doc
));
// document is gone, emit our signals
Q_EMIT
documentDeleted
(
doc
);
m_docList
.
erase
(
it
);
}
last
++
;
}
...
...
kate/kateviewspace.cpp
View file @
14f33bf9
...
...
@@ -190,10 +190,7 @@ void KateViewSpace::tabBarToggled()
KTextEditor
::
View
*
KateViewSpace
::
createView
(
KTextEditor
::
Document
*
doc
)
{
// should only be called if a view does not yet exist
{
auto
it
=
m_docToView
.
find
(
doc
);
Q_ASSERT
(
it
==
m_docToView
.
end
());
}
Q_ASSERT
(
m_docToView
.
find
(
doc
)
==
m_docToView
.
end
());
/**
* Create a fresh view
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment