mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-14 04:26:08 -05:00
Fix freeze when choosing invalid OCR model
This commit is contained in:
@@ -403,11 +403,12 @@ bool MacroConditionVideo::CheckBrightnessThreshold()
|
||||
|
||||
bool MacroConditionVideo::CheckOCR()
|
||||
{
|
||||
if (!_ocrParameters.Initialized()) {
|
||||
auto *ocr = _ocrParameters.GetOCR();
|
||||
if (!ocr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto text = RunOCR(_ocrParameters.GetOCR(), _screenshotData.GetImage(),
|
||||
auto text = RunOCR(ocr, _screenshotData.GetImage(),
|
||||
_ocrParameters.color, _ocrParameters.colorThreshold);
|
||||
if (!text) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user