mirror of https://github.com/axmolengine/axmol.git
Merge pull request #11715 from cnsoft/cnsoft-patch-1
try to fix a nullptr bug.
This commit is contained in:
commit
5140afe24c
|
@ -513,7 +513,7 @@ void Sprite3D::createNode(NodeData* nodedata, Node* root, const MaterialDatas& m
|
||||||
{
|
{
|
||||||
if(it->bones.size() > 0 || singleSprite)
|
if(it->bones.size() > 0 || singleSprite)
|
||||||
{
|
{
|
||||||
if(singleSprite)
|
if(singleSprite && root!=nullptr)
|
||||||
root->setName(nodedata->id);
|
root->setName(nodedata->id);
|
||||||
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(it->subMeshId));
|
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(it->subMeshId));
|
||||||
if(mesh)
|
if(mesh)
|
||||||
|
|
Loading…
Reference in New Issue