Commit a87c8dd5 authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent weird (Samsung...) NPE

parent c4ade9fe
......@@ -3,6 +3,7 @@ Changes between 1.1.2 and 1.1.3-git:
Main Application:
* Fix LG bug with menu button
* Fix rare NPE for Samsung devices
Changes between 1.1.1 and 1.1.2:
--------------------------------
......
......@@ -186,7 +186,8 @@ public class AudioBrowserFragment extends BrowserFragment implements SwipeRefres
boolean enabled = scrollState == SCROLL_STATE_IDLE;
if (enabled) {
enabled = view.getFirstVisiblePosition() == 0;
enabled &= view.getChildAt(0).getTop() == 0;
if (view.getChildAt(0) != null)
enabled &= view.getChildAt(0).getTop() == 0;
}
mSwipeRefreshLayout.setEnabled(enabled);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment