fix: revert project files free (already freed in init)
This commit is contained in:
@@ -133,5 +133,6 @@ void file_write(const char *path, const StringArray *lines) {
|
||||
void file_free(File *file) {
|
||||
if (!file->error && file->content != NULL) {
|
||||
free(file->content);
|
||||
file->content = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -144,9 +144,7 @@ void project_reload(Project *project, void (*reload_callback)(unsigned int)) {
|
||||
|
||||
void project_free(Project *project) {
|
||||
for (unsigned int i = 0; i < project->frag_count; i++) {
|
||||
for (unsigned int j = 0; j < MAX_SUB_FILE + 1; j++) {
|
||||
file_free(&project->fragment_shaders[i][j]);
|
||||
}
|
||||
file_free(&project->fragment_shaders[i][0]);
|
||||
}
|
||||
|
||||
config_file_free(&project->config);
|
||||
|
||||
Reference in New Issue
Block a user