diff --git a/languages/cpp/cppsupportpart.cpp b/languages/cpp/cppsupportpart.cpp index 32be7a45..e444bfea 100644 --- a/languages/cpp/cppsupportpart.cpp +++ b/languages/cpp/cppsupportpart.cpp @@ -1734,7 +1734,12 @@ void CppSupportPart::MakeMemberHelper( TQString& text, int& atLine, int& atColum TQString implFile = findSourceFile(); m_backgroundParser->lock(); - TranslationUnitAST* translationUnit = *m_backgroundParser->translationUnit( m_activeFileName ); + ParsedFilePointer pTranslationUnit = m_backgroundParser->translationUnit( m_activeFileName ); + TranslationUnitAST *translationUnit = NULL; + if (pTranslationUnit) + { + translationUnit = *pTranslationUnit; + } if ( translationUnit ) { bool fail = false;