summaryrefslogtreecommitdiff
path: root/cmd/rescribe/gui.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2022-01-31 14:20:13 +0000
committerNick White <git@njw.name>2022-01-31 14:20:13 +0000
commit2fcd0f033f99a05850b4e2f88104bb7e757aeb6c (patch)
tree788b03e671cb9145a92fe49ca328531cfe366c86 /cmd/rescribe/gui.go
parent550752fa2ab493fb6d10aa9d963fc45996c0d100 (diff)
rescribe: fix bug where a successful run would segfault
Diffstat (limited to 'cmd/rescribe/gui.go')
-rw-r--r--cmd/rescribe/gui.go2
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
}