When launching with corrupt preferences, ProgramPreferences opens a new Alert to alert the user. It also applies dark mode with FxUtils.applyDarkMode(), which accesses PathWeaver.mainScene, which hasn't been initialized yet (ProgramPreferences is first called during WelcomeController.initialize()). This causes a NullPointerException
Removing the call to applyDarkMode() fixes this, and doesn't affect behavior since the program launches in light mode anyway.
When launching with corrupt preferences,
ProgramPreferences
opens a new Alert to alert the user. It also applies dark mode withFxUtils.applyDarkMode()
, which accessesPathWeaver.mainScene
, which hasn't been initialized yet (ProgramPreferences
is first called duringWelcomeController.initialize()
). This causes a NullPointerExceptionRemoving the call to
applyDarkMode()
fixes this, and doesn't affect behavior since the program launches in light mode anyway.