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:
Adrien Destugues
2010-01-18 14:26:59 +00:00
parent 04d7359ef5
commit b36dee613e
14 changed files with 74 additions and 26 deletions

View File

@@ -138,6 +138,7 @@ void Free_fileselector_list(T_Fileselector *list)
list->First=list->First->Next;
// Et on efface l'ancien premier élément de la liste
free(temp_item);
temp_item = NULL;
}
Recount_files(list);
}
@@ -325,6 +326,7 @@ void Read_list_of_files(T_Fileselector *list, byte selected_format)
closedir(current_directory);
free(current_path);
current_path = NULL;
Recount_files(list);
}
@@ -1447,8 +1449,8 @@ byte Button_Load_or_Save(byte load, T_IO_Context *context)
break;
case 0: // Set
if (Config.Bookmark_directory[clicked_button-10])
free(Config.Bookmark_directory[clicked_button-10]);
free(Config.Bookmark_directory[clicked_button-10]);
Config.Bookmark_directory[clicked_button-10] = NULL;
Config.Bookmark_label[clicked_button-10][0]='\0';
temp=strlen(Main_current_directory);
Config.Bookmark_directory[clicked_button-10]=malloc(temp+1);