@@ -1296,13 +1296,14 @@ final int fillUp(int fromPosition, int overhang) {
 
         for (int i = 0; i < mColCount;) {
         	final View child = getFirstChildAtColumn(i);
-            LayoutParams lp = (LayoutParams) child.getLayoutParams();
-            i += Math.max(lp.span,1);
 
         	if(child == null){
         		highestView = 0;
         		break;
         	}
+            LayoutParams lp = (LayoutParams) child.getLayoutParams();
+            i += Math.max(lp.span,1);
+
         	final int top = child.getTop();
 
         	if (top < highestView) {