diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py
index 92a3e8f5be24989a6d625a4d6af3997acf95c230..ebc2d1cbcdd1ec2b244add8283849f2ea932014c 100644
--- a/src/View/MainWindow.py
+++ b/src/View/MainWindow.py
@@ -139,8 +139,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
         self.trans = QTranslator(self)
         # self.ui.retranslateUi()
 
-        if self.conf.last_study != "" and not self.conf.close_correctly:
-            self.dialog_reopen_study()
+        if not self.conf.close_correctly:
+            if self.conf.last_study != "":
+                self.dialog_reopen_study()
 
         if _doc == "external":
             logger.info("doc: Internal documentation is not available...")
diff --git a/src/config.py b/src/config.py
index c2aca042c7eb841133b0fe8fe05a8f66a5e833d0..c8613a42323b307d0a0395d698644ca0b9d3b905 100644
--- a/src/config.py
+++ b/src/config.py
@@ -316,6 +316,9 @@ class Config(SQL):
         self.commit()
 
     def set_last_study(self, filename):
+        if filename is None:
+            return
+
         self.last_study = filename
         self.close_correctly = False
         self.execute(