Fixed SEGV caused by dereferencing NULL pointer when right clicking

inside files not supported. This relates to bug 3173.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/14/head
Michele Calgaro 4 years ago
parent 99540590be
commit 8db2223147
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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;

Loading…
Cancel
Save