mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 18:14:06 +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 {
|
object Clipboard {
|
||||||
private val IS_MACOS = App.operationSystem == "OSX"
|
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) {
|
fun copy(s: String) {
|
||||||
Gdx.app.clipboard.contents = s
|
Gdx.app.clipboard.contents = s
|
||||||
|
|||||||
Reference in New Issue
Block a user