Commit 08775021 authored by Kåre Särs's avatar Kåre Särs
Browse files

Do not use a half-created object

Registering the InlineNoteProvider in the constructor triggered a scan
of inline notes while the parent object (m_pluginView) was not yet fully
constructed. The inline note tried to accessed data in the
half-constructed parent and boom...

The registration in the constructor was not needed as the viewChanged
signal is anyways emitted after the plugin is constructed.
parent e5da5fdc
......@@ -36,10 +36,6 @@ GitBlameInlineNoteProvider::GitBlameInlineNoteProvider(KateGitBlamePluginView *p
: KTextEditor::InlineNoteProvider()
, m_pluginView(pluginView)
{
QPointer<KTextEditor::View> view = m_pluginView->activeView();
if (view) {
qobject_cast<KTextEditor::InlineNoteInterface *>(view)->registerInlineNoteProvider(this);
}
}
GitBlameInlineNoteProvider::~GitBlameInlineNoteProvider()
......
Markdown is supported
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