Created
July 28, 2014 13:12
-
-
Save luciofm/15a359d09859601040d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/library/src/main/java/org/lucasr/twowayview/TWSpannableGridLayoutManager.java b/library/src/main/java/org/lucasr/twowayview/TWSpannableGridLayoutManager.java | |
index e631060..d6956ff 100644 | |
--- a/library/src/main/java/org/lucasr/twowayview/TWSpannableGridLayoutManager.java | |
+++ b/library/src/main/java/org/lucasr/twowayview/TWSpannableGridLayoutManager.java | |
@@ -218,6 +218,8 @@ public class TWSpannableGridLayoutManager extends TWGridLayoutManager { | |
int childCount = 0, i = 0; | |
while (i < itemCount && i < laneCount) { | |
SpannableItemEntry entry = (SpannableItemEntry) getItemEntryForPosition(i); | |
+ if (entry == null) | |
+ break; | |
i += (isVertical ? entry.colSpan : entry.rowSpan); | |
childCount++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment