Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CGUIWindow: resolve includes on copy of xml element to avoid manipula…

…tion of stored xml element
  • Loading branch information...
commit 3daf23d66bba7b87cbff031656fe1bad2e7f9c4c 1 parent 833d84d
@pieh pieh authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 xbmc/guilib/GUIWindow.cpp
View
5 xbmc/guilib/GUIWindow.cpp
@@ -159,6 +159,10 @@ bool CGUIWindow::Load(TiXmlElement* pRootElement)
return false;
}
+ // we must create copy of root element as we will manipulate it when resolving includes
+ // and we don't want original root element to change
+ pRootElement = (TiXmlElement*)pRootElement->Clone();
+
// set the scaling resolution so that any control creation or initialisation can
// be done with respect to the correct aspect ratio
g_graphicsContext.SetScalingResolution(m_coordsRes, m_needsScaling);
@@ -260,6 +264,7 @@ bool CGUIWindow::Load(TiXmlElement* pRootElement)
m_windowLoaded = true;
OnWindowLoaded();
+ delete pRootElement;
return true;
}
Please sign in to comment.
Something went wrong with that request. Please try again.