Mercurial > repos > blastem
changeset 1681:3f1c8258e20f
Hopefully fix Nuklear assert when loading ROM after changing video settings that some users are reporting
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 17 Jan 2019 19:13:59 -0800 |
parents | 326d1a601fb9 |
children | a0aa9e3c9508 |
files | nuklear_ui/blastem_nuklear.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/nuklear_ui/blastem_nuklear.c Thu Jan 17 10:00:24 2019 -0800 +++ b/nuklear_ui/blastem_nuklear.c Thu Jan 17 19:13:59 2019 -0800 @@ -1872,7 +1872,11 @@ static void context_destroyed(void) { - nk_sdl_shutdown(); + if (context) + { + nk_sdl_shutdown(); + context = NULL; + } } static struct nk_image load_image_texture(uint32_t *buf, uint32_t width, uint32_t height)