mirror of https://github.com/axmolengine/axmol.git
Merge pull request #10934 from pipu/avoid_crash_parse_csd
Avoid crash during parse .csd file.
This commit is contained in:
commit
465d2dc415
|
@ -1276,7 +1276,10 @@ Node* CSLoader::nodeWithFlatBuffersForSimulator(const flatbuffers::NodeTree *nod
|
|||
readername.append("Reader");
|
||||
|
||||
NodeReaderProtocol* reader = dynamic_cast<NodeReaderProtocol*>(ObjectFactory::getInstance()->createObject(readername));
|
||||
node = reader->createNodeWithFlatBuffers(options->data());
|
||||
if (reader)
|
||||
{
|
||||
node = reader->createNodeWithFlatBuffers(options->data());
|
||||
}
|
||||
|
||||
Widget* widget = dynamic_cast<Widget*>(node);
|
||||
if (widget)
|
||||
|
|
Loading…
Reference in New Issue