From 6e7dcc12e0d4089aade9143331c80fc6b3a58ea0 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 29 May 2019 07:44:52 +0200 Subject: [PATCH] Fix crash in PreloadRenderers with nullptr outputbase The crash could be triggered by a wrong command line. Signed-off-by: Stefan Weil --- src/api/tesseractmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/tesseractmain.cpp b/src/api/tesseractmain.cpp index 59f2bb5d..f2d807f6 100644 --- a/src/api/tesseractmain.cpp +++ b/src/api/tesseractmain.cpp @@ -733,7 +733,7 @@ int main(int argc, char** argv) { if (in_training_mode) { renderers.push_back(nullptr); - } else { + } else if (outputbase != nullptr) { PreloadRenderers(&api, &renderers, pagesegmode, outputbase); }