Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If there was a scaling mode value (serialized in the XML as <stretch> for legacy reasons) that was not 0 or 1 or 2, then the rectangle with the stretch information would not be initialized by get_stretch_info, which would lead to a crash, either from dividing by zero (most likely) or from reading an uninitialized value. To fix this, when reading <stretch>, normalize it to a sane default if the value is otherwise bogus. And for good measure, an assertion is added in get_stretch_info() if the value is still somehow bogus. Fixes #1155.
- Loading branch information