forked from qt-creator/qt-creator
CppEditor: Fix nullptr access
...for invalid code. Task-number: QTCREATORBUG-18355 Change-Id: If5d4d90a7dbaa770008e4e6c54c7ff3a86c6da89 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -591,7 +591,8 @@ public:
|
||||
for (Scope::iterator it = clazz->memberBegin(); it != clazz->memberEnd(); ++it) {
|
||||
if (const Function *func = (*it)->type()->asFunctionType()) {
|
||||
// Filter virtual destructors
|
||||
if (func->name()->asDestructorNameId())
|
||||
const Name *name = func->name();
|
||||
if (!name || name->asDestructorNameId())
|
||||
continue;
|
||||
|
||||
const Function *firstVirtual = 0;
|
||||
|
||||
Reference in New Issue
Block a user