Skip to content

Commit

Permalink
Only update cert info if attached to activity
Browse files Browse the repository at this point in the history
  • Loading branch information
schwabe committed Dec 28, 2024
1 parent 4a982ab commit 0d079dc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ internal abstract class KeyChainSettingsFragment : Settings_Fragment(), View.OnC
try {
val b = ExtAuthHelper.getCertificateMetaData(context!!, mProfile.mExternalAuthenticator, mProfile.mAlias)
mProfile.mAlias = b.getString(ExtAuthHelper.EXTRA_ALIAS)
requireActivity().runOnUiThread { setAlias() }
activity?.runOnUiThread { setAlias() }
} catch (e: KeyChainException) {
e.printStackTrace()
}
Expand Down Expand Up @@ -138,7 +138,7 @@ internal abstract class KeyChainSettingsFragment : Settings_Fragment(), View.OnC

val certStringCopy = certstr
val finalMetadata = metadata
requireActivity().runOnUiThread {
activity?.runOnUiThread {
mAliasCertificate.text = certStringCopy
if (finalMetadata != null)
mExtAliasName.text = finalMetadata.getString(ExtAuthHelper.EXTRA_DESCRIPTION)
Expand Down

0 comments on commit 0d079dc

Please sign in to comment.