diff --git a/NewWorldCompanion.Services/OcrHandler.cs b/NewWorldCompanion.Services/OcrHandler.cs index 9781843..8acc922 100644 --- a/NewWorldCompanion.Services/OcrHandler.cs +++ b/NewWorldCompanion.Services/OcrHandler.cs @@ -75,7 +75,7 @@ private void HandleOcrImageReadyEvent() string ocrText = tesseract.Read(image).Trim().Replace('\n', ' '); var mapping = _ocrMappings.FirstOrDefault(m => m.key.Equals(ocrText), new OcrMapping { key = ocrText, value = ocrText }); OcrText = mapping.value; - OcrText = _newWorldDataStore.GetLevenshteinItemName(OcrText); + OcrText = string.IsNullOrWhiteSpace(OcrText) ? string.Empty : _newWorldDataStore.GetLevenshteinItemName(OcrText); image.Dispose(); tesseract.Dispose();