diff options
author | Nick White <git@njw.name> | 2022-01-31 14:20:13 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2022-01-31 14:20:13 +0000 |
commit | 2fcd0f033f99a05850b4e2f88104bb7e757aeb6c (patch) | |
tree | 788b03e671cb9145a92fe49ca328531cfe366c86 | |
parent | 550752fa2ab493fb6d10aa9d963fc45996c0d100 (diff) |
rescribe: fix bug where a successful run would segfault
-rw-r--r-- | cmd/rescribe/gui.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go index bdcc16c..92d8f5b 100644 --- a/cmd/rescribe/gui.go +++ b/cmd/rescribe/gui.go @@ -423,7 +423,7 @@ func startGui(log log.Logger, cmd string, training string, tessdir string) error } err = startProcess(ctx, log, cmd, bookdir, bookname, training, savedir, tessdir) - if strings.HasSuffix(err.Error(), "context canceled") { + if err != nil && strings.HasSuffix(err.Error(), "context canceled") { progressBar.SetValue(0.0) return } |