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 ...@@ -538,17 +538,20 @@ namespace
++aI; ++aI;
aI = std::find_if(aI, rGroup.end(), isSuitableDestination); aI = std::find_if(aI, rGroup.end(), isSuitableDestination);
if (aI == rGroup.end()) if (aI != rGroup.end())
{ {
aI = std::find_if(rGroup.begin(), aStart, isSuitableDestination); vcl::Window *pWindow = *aI;
if (aI == aStart) pWindow->ImplControlFocus( GetFocusFlags::CURSOR | GetFocusFlags::Forward );
return false; return true;
} }
aI = std::find_if(rGroup.begin(), aStart, isSuitableDestination);
vcl::Window *pWindow = *aI; if (aI != aStart)
{
pWindow->ImplControlFocus( GetFocusFlags::CURSOR | GetFocusFlags::Forward ); vcl::Window *pWindow = *aI;
return true; pWindow->ImplControlFocus( GetFocusFlags::CURSOR | GetFocusFlags::Forward );
return true;
}
return false;
} }
bool nextInGroup(RadioButton *pSourceWindow, bool bBackward) 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