mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-11 19:58:49 -05:00
Prevent crash when OCR traineddata file is missing
This commit is contained in:
@@ -231,10 +231,9 @@ std::optional<std::string> RunOCR(tesseract::TessBaseAPI *ocr,
|
||||
const QImage &image, const QColor &color,
|
||||
double colorDiff)
|
||||
{
|
||||
(void)ocr;
|
||||
(void)color;
|
||||
(void)colorDiff;
|
||||
if (image.isNull()) {
|
||||
if (!ocr || image.isNull()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user