mirror of https://github.com/axmolengine/axmol.git
Avoid crash during parse .csd file.
This commit is contained in:
parent
1e271a9d96
commit
faf9d6b01c
|
@ -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