Skip to content

Commit

Permalink
Avoid crash when failing to load mods due to clipboard size smaller t…
Browse files Browse the repository at this point in the history
…han stacktrace
  • Loading branch information
yairm210 committed Feb 1, 2025
1 parent a3f83a7 commit 454a0e6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,11 @@ class ModManagementScreen private constructor(
launchOnGLThread {
ToastPopup("Could not download mod list", this@ModManagementScreen)
}
Gdx.app.clipboard.contents = ex.stackTraceToString()
try {
// If it's too large Android won't let you copy, hence the guardrails
Gdx.app.clipboard.contents = ex.stackTraceToString()
} catch (_:Exception) {}

runningSearchJob = null
return@run
}
Expand Down

0 comments on commit 454a0e6

Please sign in to comment.