Commit e9ff4c92 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Try to fix of a rare crash with Ctrl + Click in LSP



With Ctrl + Click kate sometimes crashes. I have been trying to reproduce
this issue but have been unlucky so far. The problem seems to be a stale
widget to me, so this will hopefully take care of the issue.
Signed-off-by: Waqar Ahmed's avatarWaqar Ahmed <waqar.17a@gmail.com>
(cherry picked from commit 321e1c26)
parent e4a8ec02
......@@ -258,6 +258,7 @@ public:
}
}
}
w.clear();
}
void setRangeAndWidget(const KTextEditor::Range &r, QWidget *wid)
......@@ -268,7 +269,7 @@ public:
bool isValid() const
{
return w != nullptr;
return !w.isNull();
}
private:
......@@ -284,7 +285,7 @@ private:
}
private:
QWidget *w = nullptr;
QPointer<QWidget> w;
QHash<KTextEditor::Document *, KTextEditor::MovingRange *> ranges;
KTextEditor::Range range;
};
......
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