Skip to content

Commit

Permalink
Merge pull request #6 from GrapheneCt/master
Browse files Browse the repository at this point in the history
Fixed potential NULL dereference
  • Loading branch information
isage authored Feb 6, 2025
2 parents a79f96a + 69c7250 commit 7649a7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cxml/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ cxml::Tag* Compiler::iterate_tree(tinyxml2::XMLElement* el, cxml::Tag* prevtag,
bool found = false;
for (auto& v: elem_schema.parents)
{
if (v == parent->Value())
const char* pv = parent->Value();
if (pv && v == pv)
{
found = true;
break;
Expand Down

0 comments on commit 7649a7e

Please sign in to comment.