fix: paste from clipboard would crash the game if the clipboard is empty

This commit is contained in:
minjaesong
2024-02-19 14:52:31 +09:00
parent 2c1727e495
commit d24ec8296f

View File

@@ -15,7 +15,7 @@ import java.io.File
object Clipboard {
private val IS_MACOS = App.operationSystem == "OSX"
fun fetch(): String = Gdx.app.clipboard.contents
fun fetch(): String = Gdx.app.clipboard.contents ?: ""
fun copy(s: String) {
Gdx.app.clipboard.contents = s