1
0
mirror of https://gitlab.com/klmp200/LO27.git synced 2024-11-22 22:13:19 +00:00

Fix some leaks for SDL

This commit is contained in:
Antoine Bartuccio 2016-12-29 01:37:58 +01:00
parent 3df77c90ae
commit 745c929386

View File

@ -2,7 +2,7 @@
* @Author: klmp200 * @Author: klmp200
* @Date: 2016-12-27 19:59:21 * @Date: 2016-12-27 19:59:21
* @Last Modified by: klmp200 * @Last Modified by: klmp200
* @Last Modified time: 2016-12-28 23:57:29 * @Last Modified time: 2016-12-29 00:03:19
*/ */
#include <stdio.h> #include <stdio.h>
@ -64,6 +64,7 @@ int NewWindowFromMatrix(Matrix m){
screen.HEIGHT = m.rowCount; screen.HEIGHT = m.rowCount;
if (SDL_Init(SDL_INIT_VIDEO) < 0){ if (SDL_Init(SDL_INIT_VIDEO) < 0){
SDL_Quit();
return 1; return 1;
} }
@ -83,5 +84,7 @@ int NewWindowFromMatrix(Matrix m){
SDL_DestroyRenderer(screen.renderer); SDL_DestroyRenderer(screen.renderer);
SDL_DestroyWindow(screen.window); SDL_DestroyWindow(screen.window);
SDL_Quit();
return 0; return 0;
} }