Bug Fixes in Development Tools
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
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.