mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-23 01:18:46 +00:00
Crash workaround in IG loading, ref #171
This commit is contained in:
parent
d0793b2e6b
commit
5ffea55bcc
1 changed files with 7 additions and 1 deletions
|
@ -753,7 +753,13 @@ bool CInstanceGroup::addToSceneWhenAllShapesLoaded (CScene& scene, IDriver *driv
|
||||||
{
|
{
|
||||||
_Instances[i]->clipUnlinkFromAll();
|
_Instances[i]->clipUnlinkFromAll();
|
||||||
for (j = 0; j < _InstancesInfos[i].Clusters.size(); ++j)
|
for (j = 0; j < _InstancesInfos[i].Clusters.size(); ++j)
|
||||||
_ClusterInstances[_InstancesInfos[i].Clusters[j]]->clipAddChild( _Instances[i] );
|
{
|
||||||
|
uint32 clusterInst = _InstancesInfos[i].Clusters[j];
|
||||||
|
if (clusterInst < _ClusterInstances.size())
|
||||||
|
_ClusterInstances[clusterInst]->clipAddChild( _Instances[i] );
|
||||||
|
else
|
||||||
|
nlwarning("IG: BUG: Cluster infos size %u, indexing %u", (uint32)_ClusterInstances.size(), clusterInst);
|
||||||
|
}
|
||||||
// For the first time we have to set all the instances to NOT move (and not be rebinded)
|
// For the first time we have to set all the instances to NOT move (and not be rebinded)
|
||||||
_Instances[i]->freeze();
|
_Instances[i]->freeze();
|
||||||
_Instances[i]->setClusterSystem (this);
|
_Instances[i]->setClusterSystem (this);
|
||||||
|
|
Loading…
Reference in a new issue