Skip to content
Commit e9e90729 authored by Simeon Bird's avatar Simeon Bird
Browse files

Fix convoluted crash on deletion of Query::Folder.

Sequence of events seems to be:

1. Folder::~Folder called.
2. SearchRunnable->cancel called => SearchRunnable->m_folder = 0.
3. Deletes all connections.
4. deleteLater called again, during destructor (is this ever safe?)
5. SearchRunnable::run called => since m_folder is zero, returns and
deletes SearchRunnable without setting m_folder -> SearchRunnable to
zero.
6. mutex unlocked at end of destructor
7. Folder::~Folder called again by queued deleteLater (?)
8. SearchRunnable already deleted after step 5. Crash.

Fixed by setting m_currentSearchRunnable = 0 after cancelling the folder
listing.

BUG: 308773
FIXED-IN: 4.10
REVIEW: 107339
parent 5a8e1009
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