tinyxml2::XMLElement bug汇报

测试平台 win32 cocos2d3.6
文件:base\CCUserDefault.cpp
函数 setValueForKey
tinyxml2::XMLElement* rootNode;
tinyxml2::XMLDocument* doc;
tinyxml2::XMLElement* node;
上面的局部变量没有初始化, getXMLNodeForKey 返回 null的时候, rootNode 没有初始化


    if (node)//如果node为null
    {
        if (node->FirstChild())
        {
            node->FirstChild()->SetValue(pValue);
        }
        else
        {
            tinyxml2::XMLText* content = doc->NewText(pValue);
            node->LinkEndChild(content);
        }
    }
    else
    {
        if (rootNode)//rootNode为不确定的非0值, 引发异常
        {
            tinyxml2::XMLElement* tmpNode = doc->NewElement(pKey);//new tinyxml2::XMLElement(pKey);
            rootNode->LinkEndChild(tmpNode);
            tinyxml2::XMLText* content = doc->NewText(pValue);//new tinyxml2::XMLText(pValue);
            tmpNode->LinkEndChild(content);
        }    
    }

导致这个结果是不知道什么原因 UserDefault.xml 文件的数据全部为 00 00 00 00 …
调用setValueForKey的时候就会引发异常
我这边应用平台为工业主机, 关机都是粗暴断电, 不知道是否会导致UserDefault.xml的异常

貌似发错板块了, 麻烦版主转到cocos2d-x