From bd45b3ae4fd2ff54a60077e7190c887ccbe5e5c7 Mon Sep 17 00:00:00 2001 From: Jeff Breidenbach Date: Sun, 29 Jan 2017 16:59:52 +0100 Subject: [PATCH] fix #537: Error in pixClone: pixs not defined --- ccmain/tesseractclass.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccmain/tesseractclass.h b/ccmain/tesseractclass.h index f29f8b6abf..62d7b8d2e6 100644 --- a/ccmain/tesseractclass.h +++ b/ccmain/tesseractclass.h @@ -203,7 +203,8 @@ class Tesseract : public Wordrec { pix_original_ = original_pix; // Clone to sublangs as well. for (int i = 0; i < sub_langs_.size(); ++i) - sub_langs_[i]->set_pix_original(pixClone(original_pix)); + sub_langs_[i]->set_pix_original( + original_pix ? pixClone(original_pix) : nullptr); } // Returns a pointer to a Pix representing the best available (original) image // of the page. Can be of any bit depth, but never color-mapped, as that has