From ae99a30364585ee790ade87b282cdfb725fb8a5b Mon Sep 17 00:00:00 2001 From: amaitland Date: Tue, 9 Jun 2020 14:13:08 +1000 Subject: [PATCH] Core - IDownloadItemCallback incorrectly disposed on Pause/Resume Resolves #3145 --- CefSharp.Core/Internals/CefDownloadItemCallbackWrapper.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CefSharp.Core/Internals/CefDownloadItemCallbackWrapper.h b/CefSharp.Core/Internals/CefDownloadItemCallbackWrapper.h index bc8a141fe..6b0e111ae 100644 --- a/CefSharp.Core/Internals/CefDownloadItemCallbackWrapper.h +++ b/CefSharp.Core/Internals/CefDownloadItemCallbackWrapper.h @@ -50,18 +50,18 @@ namespace CefSharp { ThrowIfDisposed(); + //Only free the callback when cancel called + //Need to be able to pause/resume #3145 _callback->Pause(); - - delete this; } virtual void Resume() { ThrowIfDisposed(); + //Only free the callback when cancel called + //Need to be able to pause/resume #3145 _callback->Resume(); - - _callback = NULL; } }; }