[chronojump] Fixed deleting a session from session load when there's no currentSession



commit cf6ef2f7f54152caf81ec4ff4eb043b4f7234091
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon May 10 10:47:57 2021 +0200

    Fixed deleting a session from session load when there's no currentSession

 src/gui/app1/session/delete.cs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/session/delete.cs b/src/gui/app1/session/delete.cs
index 79c0301d..c18065c1 100644
--- a/src/gui/app1/session/delete.cs
+++ b/src/gui/app1/session/delete.cs
@@ -75,7 +75,8 @@ public partial class ChronoJumpWindow
        
        private void on_app1s_button_delete_accept_clicked (object o, EventArgs args) 
        {
-               if(currentSession.UniqueID == tempDeletingSession.UniqueID)
+               //close session if is the same that we are working on
+               if(currentSession != null && currentSession.UniqueID == tempDeletingSession.UniqueID)
                        closeSession ();
 
                SqliteSession.DeleteAllStuff(tempDeletingSession.UniqueID.ToString());


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]