[connections/turn-db-object-into-singleton: 1/3] vnc-connection: Don't save if object isn't constructed yet




commit 0ef62be3d1794875e091bbf6184d826b17d805ae
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Apr 20 14:25:23 2021 +0200

    vnc-connection: Don't save if object isn't constructed yet

 src/vnc-connection.vala | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/vnc-connection.vala b/src/vnc-connection.vala
index 3cc8aea..68c67de 100644
--- a/src/vnc-connection.vala
+++ b/src/vnc-connection.vala
@@ -288,6 +288,9 @@ namespace Connections {
         }
 
         public override void save () {
+            if (connection.uuid == null)
+                return;
+
             var vnc = connection as VncConnection;
 
             set_boolean (connection.uuid, "view_only", vnc.view_only);


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