mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-15 14:09:06 +00:00
Fix crash in RenderObjectLayer::moveToBack()
This commit is contained in:
parent
66d3b90473
commit
6f05249fdc
1 changed files with 2 additions and 1 deletions
|
@ -314,7 +314,8 @@ void RenderObjectLayer::moveToBack(RenderObject *r)
|
|||
for (int i = newSize - 1; i >= sizeDiff; i--)
|
||||
{
|
||||
renderObjects[i] = renderObjects[i - sizeDiff];
|
||||
renderObjects[i]->setIdx(i); // Known to be non-NULL.
|
||||
if(renderObjects[i])
|
||||
renderObjects[i]->setIdx(i);
|
||||
}
|
||||
for (int i = 0; i < newIdx; i++)
|
||||
renderObjects[i] = 0;
|
||||
|
|
Loading…
Reference in a new issue