Issue #597 - Avoid reporting root node in lexer.c
This commit is contained in:
parent
5d017fe532
commit
a14cffc598
10
src/lexer.c
10
src/lexer.c
|
@ -1551,7 +1551,15 @@ void TY_(RemoveAttribute)( TidyDocImpl* doc, Node *node, AttVal *attr )
|
||||||
void TY_(FreeNode)( TidyDocImpl* doc, Node *node )
|
void TY_(FreeNode)( TidyDocImpl* doc, Node *node )
|
||||||
{
|
{
|
||||||
#if !defined(NDEBUG) && defined(_MSC_VER) && defined(DEBUG_ALLOCATION)
|
#if !defined(NDEBUG) && defined(_MSC_VER) && defined(DEBUG_ALLOCATION)
|
||||||
if (node) SPRTF("Free node %p\n", node );
|
/* avoid showing free of root node! */
|
||||||
|
if (node) {
|
||||||
|
if (RootNode != node->type) {
|
||||||
|
SPRTF("Free node %p\n", node);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
SPRTF("Root node %p\n", node);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/* this is no good ;=((
|
/* this is no good ;=((
|
||||||
if (node && doc && doc->lexer) {
|
if (node && doc && doc->lexer) {
|
||||||
|
|
Loading…
Reference in a new issue