File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
flexbox/src/main/java/com/google/android/flexbox Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1898,7 +1898,7 @@ public boolean canScrollHorizontally() {
18981898 if (mFlexWrap == FlexWrap .NOWRAP ) {
18991899 return isMainAxisDirectionHorizontal ();
19001900 } else {
1901- return !isMainAxisDirectionHorizontal () || getWidth () > mParent .getWidth ();
1901+ return !isMainAxisDirectionHorizontal () || getWidth () > ( mParent != null ? mParent .getWidth () : 0 );
19021902 }
19031903 }
19041904
@@ -1907,7 +1907,7 @@ public boolean canScrollVertically() {
19071907 if (mFlexWrap == FlexWrap .NOWRAP ) {
19081908 return !isMainAxisDirectionHorizontal ();
19091909 } else {
1910- return isMainAxisDirectionHorizontal () || getHeight () > mParent .getHeight ();
1910+ return isMainAxisDirectionHorizontal () || getHeight () > ( mParent != null ? mParent .getHeight () : 0 );
19111911 }
19121912 }
19131913
You can’t perform that action at this time.
0 commit comments