diff --git a/Components/Overlay/src/OgreOverlayContainer.cpp b/Components/Overlay/src/OgreOverlayContainer.cpp index 24ea219bc5f..63c493fa63a 100644 --- a/Components/Overlay/src/OgreOverlayContainer.cpp +++ b/Components/Overlay/src/OgreOverlayContainer.cpp @@ -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); } //---------------------------------------------------------------------