Commit b660582f authored by Ralf Habacker's avatar Ralf Habacker
Browse files

Fix coverity CID 178701: Dereference null return value

Dereferencing a pointer that might be null enumType when calling
addEnumLiteral.

CCBUG:340646
parent 4e22d66c
......@@ -637,7 +637,8 @@ bool CSharpImport::parseEnumDeclaration()
Import_Utils::addEnumLiteral(enumType, m_source[m_srcIndex - 2], QString(), m_source[m_srcIndex]);
next = advance();
} else {
Import_Utils::addEnumLiteral(enumType, m_source[m_srcIndex - 1]);
if (enumType != 0)
Import_Utils::addEnumLiteral(enumType, m_source[m_srcIndex - 1]);
}
if (next == QLatin1String("{") || next == QLatin1String("(")) {
if (! skipToClosing(next[0]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment