mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
fix: paste from clipboard would crash the game if the clipboard is empty
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user