SDL client: crash when saving game with hidden term

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2987

    SDL client: crash when saving game with hidden term

    How to reproduce:
    - open the client with only term 0
    - make term 1 visible
    - save client (ok)
    - open the client with both terms 0 and 1 visible
    - make term 1 hidden
    - save client (crash)

    Crash occurs in sdl_FontFree(): TTF_CloseFont(font->sdl_font);
    or sometimes simply in SDL_TTF.dll.

    Feels like a double free on a font.

    Adding a simple "font->sdl_font = NULL;" after "TTF_CloseFont(font->sdl_font);" in sdl_FontFree() fixes the bug.
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎