Skip to content
Commit 624cee41 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Fix crash when switching signed/encrypted emails very fast

Kleo::KeyCache internally uses a QEventLoop to block until it
finishes initializing. The initialization happens the first
time the user opens a signed or encrypted email. If they switch
to another email before the KeyCache is done initializing it
leads to a crash in MessageViewer, since message pointers change
while MessageViewer is still "blocked" in OTP.

To avoid the crash, and running a nested event loop in general,
this change introduces KeyCacheMemento, which allows to wait for
the KeyCache to initialize asynchronously before the MessagePart
queries it.

BUGS: 463083
parent f5cff7a0
Pipeline #407233 passed with stage
in 11 minutes and 20 seconds
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