Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix content type values being null after deserializing #1651

Merged
merged 1 commit into from
Nov 29, 2024

Commits on Nov 29, 2024

  1. Fix content type values being null after deserializing

    When we restore the window state from a JSON file, the content type
    field may be null if the GSON library was not able to map it to one
    of the enum values.
    
    #1644 changed the type of the
    WindowState.panelType field from integer to enum. This meant that
    the serialized values did not match the new type, causing the
    restored field to unexpectedly become NULL. This caused a crash.
    
    The solution is to change the name of the field to
    WindowState.contentType so it will not cause a clash when serializing
    and deserializing. Additionally, this PR adds checks to ensure that
    the restored value is not NULL.
    
    Fixes #1648
    felipeerias committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    3cfe826 View commit details
    Browse the repository at this point in the history