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
Please register or sign in to comment