prevent crash on null clipdata text

This commit is contained in:
Chloe committed 2024-11-22 15:27:48 -07:00
1 parent 31227860f4
commit c090754129
1 file changed
+1 -1
@@ -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 ""