summaryrefslogtreecommitdiffstats
path: root/src/core/quota_request_controller_impl.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-04-18 14:34:39 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2018-04-19 12:12:47 +0000
commitad6e1079a1edfff48bf18c25718f65a1d9f8008f (patch)
tree23c6ec1c55ed9909f724a5a231caa15de795918e /src/core/quota_request_controller_impl.cpp
parentb7e5722cce95730004ef6cb9f4aabde5bbd5685d (diff)
RequestController: Fix pure virtual method call crash
Fixes bug introduced by 4b30d82f05064723b9c3684e1c16ae0cf9d71baa where somebody had the bright idea to call reject() from RequestController's destructor. Of course, at this point the subclasses have already been destructed and a pure virtual method call error is triggered. Change-Id: Ida581285828c592a76f9ca981ec780f2711d298e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/core/quota_request_controller_impl.cpp')
-rw-r--r--src/core/quota_request_controller_impl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/quota_request_controller_impl.cpp b/src/core/quota_request_controller_impl.cpp
index ee94e1cdd..a18ad761d 100644
--- a/src/core/quota_request_controller_impl.cpp
+++ b/src/core/quota_request_controller_impl.cpp
@@ -54,6 +54,11 @@ QuotaRequestControllerImpl::QuotaRequestControllerImpl(
, m_callback(callback)
{}
+QuotaRequestControllerImpl::~QuotaRequestControllerImpl()
+{
+ reject();
+}
+
void QuotaRequestControllerImpl::accepted()
{
m_context->dispatchCallbackOnIOThread(m_callback, QuotaPermissionContextQt::QUOTA_PERMISSION_RESPONSE_ALLOW);