Skip to content

Commit

Permalink
prevent crash on null clipdata text
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Nov 22, 2024
1 parent 3122786 commit c090754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/com/geode/launcher/utils/GeodeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ object GeodeUtils {
val manager = getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
val clip = manager.primaryClip
if (clip != null && clip.itemCount > 0) {
return clip.getItemAt(0).text.toString()
return clip.getItemAt(0).coerceToText(this).toString()
}
}
return ""
Expand Down

0 comments on commit c090754

Please sign in to comment.