# HG changeset patch # User Michael Pavone # Date 1613854046 28800 # Node ID bcc85f6b06c28d99b0d03d1d34aa3abcbd442ce5 # Parent 1e7a63f0ccf4e905b7acce1d287638fd6c619765 Close VDP debug windows when VDP is freed. Fixes Trac bug 39 diff -r 1e7a63f0ccf4 -r bcc85f6b06c2 vdp.c --- a/vdp.c Mon Feb 15 22:10:49 2021 -0800 +++ b/vdp.c Sat Feb 20 12:47:26 2021 -0800 @@ -254,6 +254,15 @@ void vdp_free(vdp_context *context) { + if (headless) { + free(context->fb); + } + for (int i = 0; i < VDP_NUM_DEBUG_TYPES; i++) + { + if (context->enabled_debuggers & (1 << i)) { + vdp_toggle_debug_view(context, i); + } + } free(context); }