Skip to content

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

Open
zhthhh wants to merge 1 commit intoleethomason:masterfrom
zhthhh:fix-1048-deletenode-nullptr
Open

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

Conversation

@zhthhh
Copy link

@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
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.

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.

2 participants