Skip to content

Commit 69075e7

Browse files
committed
Merge pull request etsy#91 from ajpolt/master
Merged pull request etsy#91 - Fix for "NPE onSizeChanged" etsy#41
2 parents 84a06f8 + 7699ba8 commit 69075e7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/src/main/java/com/etsy/android/grid/StaggeredGridView.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,13 @@ private void onColumnSync() {
922922
if (DBG) Log.d(TAG, "onColumnSync column width:" + mColumnWidth);
923923

924924
for (int pos = 0; pos < syncPosition; pos++) {
925+
//Check for weirdness again
926+
final Double heightRatio = positionHeightRatios.get(pos);
927+
if(heightRatio == null){
928+
break;
929+
}
930+
925931
final GridItemRecord rec = getOrCreateRecord(pos);
926-
final double heightRatio = positionHeightRatios.get(pos);
927932
final int height = (int) (mColumnWidth * heightRatio);
928933
rec.heightRatio = heightRatio;
929934

0 commit comments

Comments
 (0)