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>
(cherry picked from commit 8db2223147)
r14.0.x
Michele Calgaro 4 years ago
parent 036a3ec293
commit f6002795d6
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