Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

{.location = 0, .length = 0} is a valid NSRange #27

Closed
toulouse opened this issue Sep 23, 2014 · 0 comments
Closed

{.location = 0, .length = 0} is a valid NSRange #27

toulouse opened this issue Sep 23, 2014 · 0 comments
Labels

Comments

@toulouse
Copy link
Contributor

In ASRangeController.mm

static BOOL ASRangeIsValid(NSRange range)
{
  return range.location != NSNotFound && range.length > 0;
}

This causes an assert from -setVisibleRange: when you successfully scroll all available index paths offscreen, like so:
1
2

This assert seems erroneous as having no visible items is achievable normally.

secretiverhyme added a commit that referenced this issue Sep 24, 2014
secretiverhyme added a commit that referenced this issue Oct 22, 2014
(1) We can't size nodes without a delegate, and if our owning controller
has been deallocated, our delegate will be nil.  Handle this more
gracefully.

(2) Our teardown code needs to be executed on the main thread, but it's
conceivable that we might hit refcount 0 on a background queue.  Force
deallocation to occur on the main thread.

Closes #27.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants