Skip to content
Commit f2f6539f authored by Kevin Funk's avatar Kevin Funk
Browse files

Don't crash in case of dangling updates

DUChain::waitForUpdate does QApplication::progressEvents() in a while-loop and
waits for an update from the background parser. In case the application
is shut down, CppLanguageSupport eventually is deleted, but the
while-loop may still be running. When the call to
DUChain::waitForUpdate inside
CppLanguageSupport::switchDefinitionDeclaration returns, 'this' is
already invalid and the subsequent call to CppLanguage::standardContext
ends up in SIGSEGV.
Hence, always check if the context returned by waitForUpdate(...) is
valid and return immediately if not.

BUG: 325648
parent 253f6c68
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