Commit 88d2e9a1 authored by Artur Grunau's avatar Artur Grunau
Browse files

Fix a double free in LogHighlighter's destructor

In its destructor, LogHighlighter first of all deleted its filter regex
explicitly, and then called `setFilterRegExp(0)`, triggering a second —
this time somewhat implicit — delete. If the filter regex pointer was
not NULL, this caused the application to crash due to a double-free.

Fix this error by not invoking `setFilterRegExp` in LogHighlighter's
destructor; the explicit delete performs the same cleanup as
`setFilterRegExp` anyways.
parent e7b11bfa
......@@ -89,7 +89,6 @@ namespace campvis {
LogHighlighter::~LogHighlighter() {
delete _filterRegExp;
delete _logLevelRegExp;
setFilterRegExp(0);
}
void LogHighlighter::setFilterRegExp(const QRegExp* filterRegExp) {
......
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