mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 14:25:37 +00:00
Android: Fix a possible exception when refreshing game list
This commit is contained in:
parent
4e802e90ca
commit
fb48e8f093
|
@ -2,6 +2,7 @@ package com.github.stenzek.duckstation;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -38,7 +39,12 @@ public class GameList {
|
||||||
Arrays.sort(newEntries, new GameListEntryComparator());
|
Arrays.sort(newEntries, new GameListEntryComparator());
|
||||||
|
|
||||||
mContext.runOnUiThread(() -> {
|
mContext.runOnUiThread(() -> {
|
||||||
progressCallback.dismiss();
|
try {
|
||||||
|
progressCallback.dismiss();
|
||||||
|
} catch (Exception e) {
|
||||||
|
Log.e("GameList", "Exception dismissing refresh progress");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
mEntries = newEntries;
|
mEntries = newEntries;
|
||||||
mAdapter.notifyDataSetChanged();
|
mAdapter.notifyDataSetChanged();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue