Skip to content

sdl2::ttf::init incorrectly incorrectly uses the last OS error. #1347

Closed
@sprocklem

Description

@sprocklem

init assumes that only OS errors are encountered during initialization, but this is not the case since the underlying FT_Init_FreeType has other error conditions. Instead, init should get the error from SDL_GetError as documented here (TTF_GetError is #defined as SDL_GetError).

To retain backwards compatibility with the current error type, it may be necessary to wrap the error in an Error with ErrorKind::Other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions