Skip to content

Fix issue #1048: Add null pointer check in XMLDocument::DeleteNode#1057

Merged
leethomason merged 1 commit intoleethomason:masterfrom
zhthhh:fix-1048-deletenode-nullptr
Mar 10, 2026
Merged

Fix issue #1048: Add null pointer check in XMLDocument::DeleteNode#1057
leethomason merged 1 commit intoleethomason:masterfrom
zhthhh:fix-1048-deletenode-nullptr

Conversation

@zhthhh
Copy link
Copy Markdown
Contributor

@zhthhh zhthhh commented Dec 7, 2025

  • Add null pointer check in XMLDocument::DeleteNode() method
  • Add test case to verify null pointer handling
  • Prevents segmentation fault when calling DeleteNode(nullptr)

…leteNode

- Add null pointer check in XMLDocument::DeleteNode() method
- Add test case to verify null pointer handling
- Prevents segmentation fault when calling DeleteNode(nullptr)
@zhthhh
Copy link
Copy Markdown
Contributor Author

zhthhh commented Dec 7, 2025

I have added null pointer tests for the DeletNode function. Previously, passing a null pointer to DeletNode in the release build would cause a segmentation fault. With this modification, a safe return logic has been implemented to handle such cases.

Comment thread tinyxml2.cpp
@leethomason leethomason merged commit aba13c5 into leethomason:master Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants