summaryrefslogtreecommitdiff
path: root/src/project.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/project.c')
-rw-r--r--src/project.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/project.c b/src/project.c
index 2b70a47..1366abf 100644
--- a/src/project.c
+++ b/src/project.c
@@ -402,9 +402,9 @@ bool g_openida_project_save(openida_project *project, const char *filename)
/* Sauvegarde finale */
- result &= save_xml_file(xdoc, filename);
+ result &= save_xml_file(xdoc, filename != NULL ? filename : project->filename);
- if (result)
+ if (result && filename != NULL)
{
if (project->filename != NULL) free(project->filename);
project->filename = strdup(filename);