Skip to content

Commit

Permalink
Dont die on missing launch options file
Browse files Browse the repository at this point in the history
  • Loading branch information
the-eater committed Jun 6, 2019
1 parent 9cbe3ff commit 267dc9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/kotlin/views/profile/ProfileSettings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ class ProfileSettings : Fragment() {
get() = "${profile.location}/.emo/launch.json"

private val launchOptions: LaunchOptions
get() = Klaxon().parse<LaunchOptions>(File(settingsFile)) ?: LaunchOptions()
get() = File(settingsFile).let {
if (!it.exists())
null
else
Klaxon().parse<LaunchOptions>(File(settingsFile))
} ?: LaunchOptions()


private var jvmArgs: String by fxprop()

Expand Down

0 comments on commit 267dc9a

Please sign in to comment.