raeleus / skin-composer

Create skins for LibGDX scene2d.ui with a graphical interface.
MIT License
425 stars 34 forks source link

NPE when loading FreeTypeFont placeholder #88

Closed TheLogicMaster closed 3 years ago

TheLogicMaster commented 3 years ago

This occurs when loading a project saved with a placeholder font in the latest release and latest commit.

Exception:

java.lang.NullPointerException
    at com.ray3k.skincomposer.dialog.DialogPathErrors.resetDrawableTable(DialogPathErrors.java:274)
    at com.ray3k.skincomposer.dialog.DialogPathErrors.<init>(DialogPathErrors.java:87)
    at com.ray3k.skincomposer.dialog.DialogFactory.showDialogPathErrors(DialogFactory.java:1109)
    at com.ray3k.skincomposer.RootTable$RecentFileListener.lambda$changed$1(RootTable.java:2690)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:154)
    at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:114)
    at com.ray3k.skincomposer.desktop.DesktopLauncher.main(DesktopLauncher.java:406)

Works normally by disabling ProjectData.verifyFreeTypeFontPaths() errors, so seems to be an issue with how the placeholders are loaded. Maybe a check for font.useCustomSerializer is needed to only check for missing custom serializer fonts?

raeleus commented 3 years ago

Sorry for the delay. The fix will be in the next version. Thanks for reporting!