ofz: loop in layout
Change-Id: I7c776d3b02bd8d35f160e82916213e402e9c88ab
This commit is contained in:
parent
3b998365f4
commit
8b1bc1a3f5
@ -367,19 +367,25 @@ bool LwpVirtualLayout::IsStyleLayout()
|
||||
LwpVirtualLayout* LwpVirtualLayout::FindChildByType(LWP_LAYOUT_TYPE eType)
|
||||
{
|
||||
LwpObjectID& rID = GetChildHead();
|
||||
LwpVirtualLayout* pPrevLayout = nullptr;
|
||||
|
||||
while(!rID.IsNull())
|
||||
{
|
||||
LwpVirtualLayout * pLayout = dynamic_cast<LwpVirtualLayout *>(rID.obj().get());
|
||||
if (!pLayout)
|
||||
break;
|
||||
|
||||
if (pPrevLayout && pLayout == pPrevLayout)
|
||||
{
|
||||
SAL_WARN("lwp", "loop in layout");
|
||||
break;
|
||||
}
|
||||
|
||||
pPrevLayout = pLayout;
|
||||
|
||||
if (pLayout->GetLayoutType() == eType)
|
||||
{
|
||||
return pLayout;
|
||||
}
|
||||
|
||||
rID = pLayout->GetNext();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user