Commit b82fcaa3 authored by David Edmundson's avatar David Edmundson Committed by Elvis Angelaccio
Browse files

Cleaup AddJob on destruction

In a recent patch m_addJob was cleaned up correctly. The code throughout
already checked pointer validity, but at no point was this reset.

This meant a queued task would then hit a dangling pointer.

BUG: 442774
parent ce4c79b0
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <QElapsedTimer> #include <QElapsedTimer>
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QPointer>
namespace Kerfuffle namespace Kerfuffle
{ {
...@@ -215,7 +216,7 @@ protected: ...@@ -215,7 +216,7 @@ protected:
bool doKill() override; bool doKill() override;
private: private:
AddJob *m_addJob = nullptr; QPointer<AddJob> m_addJob;
QVector<Archive::Entry*> m_entries; QVector<Archive::Entry*> m_entries;
CompressionOptions m_options; CompressionOptions m_options;
}; };
......
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