Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't allow selection when the sidebar is empty. Closes #1.

  • Loading branch information...
commit 86611392bfbf6ed14cab7c41465dcbcf0c045ae4 1 parent a920370
@bjhomer authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Classes/HSImageSidebarView.m
View
2  Classes/HSImageSidebarView.m
@@ -379,7 +379,7 @@ - (void)tappedSidebar:(UITapGestureRecognizer *)recognizer {
CGPoint hitPoint = [recognizer locationInView:_scrollView];
NSInteger newSelection = ((isHorizontal ? hitPoint.x : hitPoint.y) / rowHeight);
- if (newSelection > self.imageCount - 1) {
+ if (newSelection > self.imageCount - 1 || self.imageCount == 0) {
self.selectedIndex = -1;
}
else {
Please sign in to comment.
Something went wrong with that request. Please try again.