File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1611,14 +1611,19 @@ CppServiceHandler::getTags(const std::vector<model::CppAstNode>& nodes_)
16111611 tags[node.id ].push_back (visibility);
16121612 }
16131613
1614- // --- Virtual Tag ---//
1614+ // --- Other Tags ---//
16151615
16161616 FuncResult funcNodes = _db->query <cc::model::CppFunction>(
16171617 FuncQuery::entityHash == defNode.entityHash );
1618- const model::CppFunction& funcNode = *funcNodes.begin ();
1618+ if (!funcNodes.empty ())
1619+ {
1620+ const model::CppFunction& funcNode = *funcNodes.begin ();
16191621
1620- for (const model::Tag& tag : funcNode.tags )
1621- tags[node.id ].push_back (model::tagToString (tag));
1622+ for (const model::Tag& tag : funcNode.tags )
1623+ tags[node.id ].push_back (model::tagToString (tag));
1624+ } else
1625+ LOG (warning) << " Database query result was not expected to be empty. "
1626+ << __FILE__ << " , line #" << __LINE__;
16221627
16231628 break ;
16241629 }
You can’t perform that action at this time.
0 commit comments