From b8c3217d1e0b881c8a82c157324ba9cd821497fd Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Tue, 17 Nov 2020 08:36:46 +0100
Subject: Fixed exit cancellation when the project is not saved.

---
 src/gui/editor.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gui/editor.c b/src/gui/editor.c
index 1a58b90..6e98423 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -426,12 +426,14 @@ static gboolean on_delete_editor(GtkWidget *widget, GdkEvent *event, gpointer un
         {
             case GTK_RESPONSE_YES:
                 mcb_file_save_project(NULL, NULL);
+                result = (g_study_project_get_filename(project) == NULL);
                 break;
 
             case GTK_RESPONSE_NO:
                 break;
 
             case GTK_RESPONSE_CANCEL:
+            default:
                 result = TRUE;
                 break;
 
-- 
cgit v0.11.2-87-g4458