mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-03 00:49:01 +08:00
Null check for GetSourceYResolution (#3457)
* Null check for GetSourceYResolution Added missing NULL check to avoid crash when we read property in our tesseract wrapper. * Added missing return value. added -1 to return if undefined.
This commit is contained in:
parent
7a308edcb1
commit
75e6c3ea4c
@ -955,6 +955,8 @@ const char *TessBaseAPI::GetDatapath() {
|
||||
}
|
||||
|
||||
int TessBaseAPI::GetSourceYResolution() {
|
||||
if (thresholder_ == nullptr)
|
||||
return -1;
|
||||
return thresholder_->GetSourceYResolution();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user