Skip to content

Commit

Permalink
Overlay: Container - update children first as notifyParent may call i…
Browse files Browse the repository at this point in the history
…nitialise on them
  • Loading branch information
paroj committed Dec 10, 2023
1 parent d30531e commit f5afd09
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Components/Overlay/src/OgreOverlayContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ namespace Ogre {
//---------------------------------------------------------------------
void OverlayContainer::_notifyParent(OverlayContainer* parent, Overlay* overlay)
{
OverlayElement::_notifyParent(parent, overlay);

// Update children
// Update children first as notifyParent may call initialise on them
for (const auto& p : mChildren)
{
// Notify the children of the overlay
p.second->_notifyParent(this, overlay);
}

OverlayElement::_notifyParent(parent, overlay);
}

//---------------------------------------------------------------------
Expand Down

0 comments on commit f5afd09

Please sign in to comment.