Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop in GetPreviousVisibleNoInit #599

Closed
asviridenkov opened this issue Dec 23, 2015 · 1 comment
Closed

Infinite loop in GetPreviousVisibleNoInit #599

asviridenkov opened this issue Dec 23, 2015 · 1 comment

Comments

@asviridenkov
Copy link

Code

          if Assigned(Result.PrevSibling) then
          begin
            // No children anymore, so take the previous sibling.
            if vsVisible in Result.PrevSibling.States then
            begin
              Result := Result.PrevSibling;
              Break;
            end;
          end

Should be changed to

          if Assigned(Result.PrevSibling) then
          begin
            // No children anymore, so take the previous sibling.
             Result := Result.PrevSibling;
            if vsVisible in Result.States then
              Break;
          end

or in come cases (PrevSibling is assigned but not visible) tree will go in infinite loop.

@joachimmarder
Copy link
Contributor

Thanks, change is merged to master.

ValtsS pushed a commit to ValtsS/Virtual-TreeView that referenced this issue Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants