changeset 2312:3f2ecd156453

Fix use after free when re-entering controller binding UI after saving bindings
author Michael Pavone <pavone@retrodev.com>
date Wed, 29 Mar 2023 22:40:05 -0700
parents 07aeea6cb068
children ef5dc4d02d27
files nuklear_ui/blastem_nuklear.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/nuklear_ui/blastem_nuklear.c	Wed Mar 29 22:36:34 2023 -0700
+++ b/nuklear_ui/blastem_nuklear.c	Wed Mar 29 22:40:05 2023 -0700
@@ -1001,6 +1001,8 @@
 	if (dest == SIMILAR_CONTROLLERS) {
 		free(key);
 	}
+	free(bindings);
+	bindings = NULL;
 	pop_view();
 	config_dirty = 1;
 }