Ensure pointers are put back to NULL when freed.
--Cette ligne, et les suivantes ci-dessous, seront ignorées-- M trunk/palette.c M trunk/init.c M trunk/engine.c M trunk/filesel.c M trunk/miscfileformats.c M trunk/pages.c M trunk/brush_ops.c M trunk/op_c.c M trunk/operatio.c M trunk/brush.c M trunk/loadsave.c M trunk/graph.c M trunk/fileformats.c M trunk/main.c git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1277 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
2
init.c
2
init.c
@@ -824,12 +824,14 @@ T_Gui_skin * Load_graphics(const char * skin_file)
|
||||
{
|
||||
sprintf(Gui_loading_error_message, "Unable to load the skin image (missing? not an image file?)\n");
|
||||
free(gfx);
|
||||
gfx = NULL;
|
||||
return NULL;
|
||||
}
|
||||
if (Parse_skin(gui, gfx))
|
||||
{
|
||||
SDL_FreeSurface(gui);
|
||||
free(gfx);
|
||||
gfx = NULL;
|
||||
return NULL;
|
||||
}
|
||||
SDL_FreeSurface(gui);
|
||||
|
||||
Reference in New Issue
Block a user