Removes a memory leak

This commit is contained in:
Linus Probert 2018-10-21 07:36:47 +02:00
parent d2fe3fce4c
commit f5a1c2f48a
3 changed files with 6 additions and 2 deletions

2
.vimrc
View File

@ -1,6 +1,6 @@
nnoremap <F1> :Make<cr> nnoremap <F1> :Make<cr>
nnoremap <F2> :Make lint test<cr> nnoremap <F2> :Make lint test<cr>
nnoremap <F3> :Termdebug _build/debug/breakhack<cr> nnoremap <F3> :Termdebug LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ _build/debug/breakhack<cr>
nnoremap <F4> :ter ++close env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/debug/breakhack<cr> nnoremap <F4> :ter ++close env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/debug/breakhack<cr>
packadd termdebug packadd termdebug

View File

@ -12,7 +12,7 @@ test:
.PHONY: test .PHONY: test
run: $(all) run: $(all)
@./_build/debug/breakhack @LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./ ./_build/debug/breakhack
.PHONY: run .PHONY: run
lint: lint:

View File

@ -625,7 +625,11 @@ handle_main_input(void)
switch (gGameState) { switch (gGameState) {
case CREDITS: case CREDITS:
case SCORE_SCREEN: case SCORE_SCREEN:
gGameState = MENU;
break;
case CHARACTER_MENU: case CHARACTER_MENU:
menu_destroy(charSelectMenu);
charSelectMenu = NULL;
gGameState = MENU; gGameState = MENU;
break; break;
case MENU: case MENU: