Skip to content

Commit

Permalink
Fix crash when trying to restrict offered Sudoku types
Browse files Browse the repository at this point in the history
Changed method attempts to use the current profile, but did not load it.
Results in a crash (NPE) whenever attempting to restrict offered Sudoku types.
  • Loading branch information
Ecconia authored and timo-a committed Jan 4, 2022
1 parent a9225c0 commit bea76ca
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class RestrictTypesActivity : SudoqListActivity(), OnItemClickListener, OnItemLo
private fun initialiseTypes() {
val profilesDir = getDir(getString(R.string.path_rel_profiles), MODE_PRIVATE)
val pm = ProfileManager(profilesDir, ProfileRepo(profilesDir), ProfilesListRepo(profilesDir))
pm.loadCurrentProfile()
types = pm.assistances.wantedTypesList
// initialize ArrayAdapter for the type names and set it
adapter = RestrictTypesAdapter(this, types!!)
Expand Down

0 comments on commit bea76ca

Please sign in to comment.