diff --git a/main.go b/main.go index 655fe04..57a26b2 100644 --- a/main.go +++ b/main.go @@ -131,8 +131,11 @@ func (c *Controller) SelectLog(o string) { func (c *Controller) InitFromLog() { c.RefreshCheckpoint() - if c.Model.GetCheckpoint() != nil && c.Model.GetCheckpoint().Size > 0 { - size := c.Model.GetCheckpoint().Size + if err := c.Model.GetError(); err != nil { + klog.Exit(err) + } + if cp := c.Model.GetCheckpoint(); cp != nil && cp.Size > 0 { + size := cp.Size c.GetLeaf(size, size-1) } }