about summary refs log tree commit diff
path: root/src/nix-env/profiles.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-env/profiles.hh')
-rw-r--r--src/nix-env/profiles.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nix-env/profiles.hh b/src/nix-env/profiles.hh
index 2422c9f7425a..2ce468dfa837 100644
--- a/src/nix-env/profiles.hh
+++ b/src/nix-env/profiles.hh
@@ -11,6 +11,14 @@ struct Generation
     int number;
     Path path;
     time_t creationTime;
+    Generation()
+    {
+        number = -1;
+    }
+    operator bool() const
+    {
+        return number != -1;
+    }
 };
 
 typedef list<Generation> Generations;