summaryrefslogtreecommitdiffhomepage
path: root/pkg/state/decode.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/state/decode.go')
-rw-r--r--pkg/state/decode.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/state/decode.go b/pkg/state/decode.go
index c9971cdf6..89467ca8e 100644
--- a/pkg/state/decode.go
+++ b/pkg/state/decode.go
@@ -584,10 +584,12 @@ func (ds *decodeState) Load(obj reflect.Value) {
})
// Create the root object.
- ds.objectsByID = append(ds.objectsByID, &objectDecodeState{
+ rootOds := &objectDecodeState{
id: 1,
obj: obj,
- })
+ }
+ ds.objectsByID = append(ds.objectsByID, rootOds)
+ ds.pending.PushBack(rootOds)
// Read the number of objects.
lastID, object, err := ReadHeader(ds.r)