Fixed crash when no custom dns server
This commit is contained in:
parent
f5d31e5440
commit
eac5656fec
@ -44,7 +44,9 @@ public class DnsServersFragment extends ToolbarFragment {
|
||||
@Override
|
||||
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
|
||||
if (viewHolder instanceof ViewHolder) {
|
||||
if (DnsServerHelper.isInUsing(Daedalus.configurations.getCustomDnsServers().get(((ViewHolder) viewHolder).getIndex()))) {
|
||||
int index = ((ViewHolder) viewHolder).getIndex();
|
||||
if (index < Daedalus.configurations.getCustomDnsServers().size() &&
|
||||
DnsServerHelper.isInUsing(Daedalus.configurations.getCustomDnsServers().get(index))) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user