Commit 1783ea12 authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent NPE for SortableFragment children classes

parent 73035f27
......@@ -51,7 +51,9 @@ public abstract class SortableFragment<T extends SortableAdapter> extends MediaB
@Override
public void onHiddenChanged(boolean hidden) {
super.onHiddenChanged(hidden);
getCurrentAdapter().updateIfSortChanged();
final T adapter = getCurrentAdapter();
if (adapter != null)
adapter.updateIfSortChanged();
}
@Override
......
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