From fb48e8f0931654fec9c99281ae038245952645b8 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 20 Jan 2021 14:45:04 +1000 Subject: [PATCH] Android: Fix a possible exception when refreshing game list --- .../java/com/github/stenzek/duckstation/GameList.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/github/stenzek/duckstation/GameList.java b/android/app/src/main/java/com/github/stenzek/duckstation/GameList.java index f036a5d10..48824c1b5 100644 --- a/android/app/src/main/java/com/github/stenzek/duckstation/GameList.java +++ b/android/app/src/main/java/com/github/stenzek/duckstation/GameList.java @@ -2,6 +2,7 @@ package com.github.stenzek.duckstation; import android.app.Activity; import android.os.AsyncTask; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -38,7 +39,12 @@ public class GameList { Arrays.sort(newEntries, new GameListEntryComparator()); mContext.runOnUiThread(() -> { - progressCallback.dismiss(); + try { + progressCallback.dismiss(); + } catch (Exception e) { + Log.e("GameList", "Exception dismissing refresh progress"); + e.printStackTrace(); + } mEntries = newEntries; mAdapter.notifyDataSetChanged(); });