Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. Igalia#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 Igalia#1648
- Loading branch information