Skip to content

Commit 3367ef2

Browse files
Synchronize changes from 1.6 master branch [ci skip]
b59f414 Small improvement for CGUI_Impl::DestroyElementRecursive
2 parents 669d42b + b59f414 commit 3367ef2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Client/gui/CGUI_Impl.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ void CGUI_Impl::DestroyElementRecursive(CGUIElement* pElement)
2323

2424
if (auto* pImpl = dynamic_cast<CGUIElement_Impl*>(pElement))
2525
{
26-
DestroyGuiWindowRecursive(pImpl->GetWindow());
26+
CEGUI::Window* pWindow = pImpl->GetWindow();
27+
if (pWindow)
28+
DestroyGuiWindowRecursive(pWindow);
29+
else
30+
delete pElement;
2731
return;
2832
}
2933

0 commit comments

Comments
 (0)