Kaydet (Commit) 5b554b31 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1440300 rework to silence Using invalid iterator

Change-Id: Icf887a54f0e999c633e4e3f514086c29842427fc
Reviewed-on: https://gerrit.libreoffice.org/61835Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 469e3b5d
......@@ -538,17 +538,20 @@ namespace
++aI;
aI = std::find_if(aI, rGroup.end(), isSuitableDestination);
if (aI == rGroup.end())
if (aI != rGroup.end())
{
aI = std::find_if(rGroup.begin(), aStart, isSuitableDestination);
if (aI == aStart)
return false;
vcl::Window *pWindow = *aI;
pWindow->ImplControlFocus( GetFocusFlags::CURSOR | GetFocusFlags::Forward );
return true;
}
vcl::Window *pWindow = *aI;
pWindow->ImplControlFocus( GetFocusFlags::CURSOR | GetFocusFlags::Forward );
return true;
aI = std::find_if(rGroup.begin(), aStart, isSuitableDestination);
if (aI != aStart)
{
vcl::Window *pWindow = *aI;
pWindow->ImplControlFocus( GetFocusFlags::CURSOR | GetFocusFlags::Forward );
return true;
}
return false;
}
bool nextInGroup(RadioButton *pSourceWindow, bool bBackward)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment