mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:39:35 +08:00
Issue 1316: The traineddata file must be closed after it was opened
This commit is contained in:
parent
b13691fda0
commit
d3252f926e
@ -60,7 +60,10 @@ Dawg *DawgLoader::Load() {
|
||||
if (!data_loader.Init(data_file_name_, dawg_debug_level_)) {
|
||||
return NULL;
|
||||
}
|
||||
if (!data_loader.SeekToStart(tessdata_dawg_type_)) return NULL;
|
||||
if (!data_loader.SeekToStart(tessdata_dawg_type_)) {
|
||||
data_loader.End(); /// Must close the file
|
||||
return NULL;
|
||||
}
|
||||
FILE *fp = data_loader.GetDataFilePtr();
|
||||
DawgType dawg_type;
|
||||
PermuterType perm_type;
|
||||
|
Loading…
Reference in New Issue
Block a user