diff options
author | Christian Kamm <mail@ckamm.de> | 2017-07-06 14:43:34 +0300 |
---|---|---|
committer | ckamm <mail@ckamm.de> | 2017-07-06 15:34:02 +0300 |
commit | d01065b9a12e69ca493a232f3a8e8f3d416fed52 (patch) | |
tree | 78535e7432c55a07f6cdb5512afa55eeab087f6c /test/CMakeLists.txt | |
parent | ce8341ca1fd21d946e8c056430025f08d586e380 (diff) |
Fix crash on account deletion
Calling forgetSensitiveData() on account deletion leads to a timer for
clearQNAMCache() being queued. Then the Account object is deleted. The
Credentials object stays alive for now because it has a deleteLater
deleter.
If the timer calls into a slot on the Credentials object, the _account
pointer will be invalid at this time.
As a workaround, move the target slot to Account - that way it will not
be called as the account object is already destroyed.
However since Account and Credentials are mutually dependent, it would
be much preferable if their lifetimes were linked, avoiding this
category of bugs.
The current behavior was introduced in
d40c56eda561e3a541bf1b23f70fa8d659d3037e and I currently don't
understand why - maybe there's another way of dealing with the problem
that existed then.
Diffstat (limited to 'test/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions