Skip to content

Commit

Permalink
Fix empty cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
qnga committed Feb 5, 2024
1 parent 751c920 commit 9f303a8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@ static List<Metadata> getMaps(@NonNull ContentProviderClient client, @NonNull St
if (cursor == null)
return maps;

cursor.moveToFirst();
if (!cursor.moveToFirst()) {
cursor.close();
return maps;
}

do {
// map name
int nameIdx = cursor.getColumnIndex(PluginTileSourceContract.COLUMN_NAME);
Expand Down

0 comments on commit 9f303a8

Please sign in to comment.