diff options
Diffstat (limited to 'protocols/Tlen/src/tlen_xml.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_xml.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Tlen/src/tlen_xml.cpp b/protocols/Tlen/src/tlen_xml.cpp index 2c86119649..a3e2d892e8 100644 --- a/protocols/Tlen/src/tlen_xml.cpp +++ b/protocols/Tlen/src/tlen_xml.cpp @@ -349,11 +349,12 @@ static BOOL TlenXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char *e case ELEM_CLOSE:
if (node->name != NULL && !strcmp(node->name, text)) {
node->state = NODE_CLOSE;
- if (node->depth == 1 && xmlState->callback1_close != NULL) {
+ int nodeDepth = node->depth;
+ if (nodeDepth == 1 && xmlState->callback1_close != NULL) {
(*(xmlState->callback1_close))(node, xmlState->userdata1_close);
TlenXmlRemoveChild(parentNode, node);
}
- if (node->depth == 2 && xmlState->callback2_close != NULL) {
+ if (nodeDepth == 2 && xmlState->callback2_close != NULL) {
(*xmlState->callback2_close)(node, xmlState->userdata2_close);
TlenXmlRemoveChild(parentNode, node);
}
|