ensure cleanup on autocache upon destruction

Fixes double free.
This commit is contained in:
itsmattkc
2021-02-20 23:08:11 +11:00
parent b21271534f
commit f4df6a7918
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -28,6 +28,12 @@ PreviewAutoCacher::PreviewAutoCacher() :
connect(&delayed_requeue_timer_, &QTimer::timeout, this, &PreviewAutoCacher::RequeueFrames);
}
PreviewAutoCacher::~PreviewAutoCacher()
{
// Ensure everything is cleaned up appropriately
SetViewerNode(nullptr);
}
RenderTicketPtr PreviewAutoCacher::GetSingleFrame(const rational &t)
{
if (single_frame_render_) {
+2
View File
@@ -24,6 +24,8 @@ class PreviewAutoCacher : public QObject
public:
PreviewAutoCacher();
virtual ~PreviewAutoCacher() override;
RenderTicketPtr GetSingleFrame(const rational& t);
/**