From db1b55f2b923a2bc8c7eb14f4de0bd38d6d5ddc5 Mon Sep 17 00:00:00 2001 From: Andy Black Date: Wed, 20 May 2026 11:02:57 -0700 Subject: [PATCH] LT-22525: Handle missing POS in msa and empty form hvo Change-Id: I7bab55c0de2a4d0bc5340da8fa8765137518f84d --- Src/Utilities/pcpatrflex/ToneParsFLExDll/ANABuilder.cs | 2 +- Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ANABuilder.cs b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ANABuilder.cs index 9457f99d01..ac8ec716ea 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ANABuilder.cs +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ANABuilder.cs @@ -208,7 +208,7 @@ private string GetAnaProperties(ParseMorph pMorph) case MoStemMsaTags.kClassId: var stemMsa = msa as IMoStemMsa; sb.Append("RootPOS"); - sb.Append(stemMsa.PartOfSpeechRA.Hvo); + sb.Append((stemMsa.PartOfSpeechRA != null) ? stemMsa.PartOfSpeechRA.Hvo : 0); break; case MoInflAffMsaTags.kClassId: break; diff --git a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs index 824d75fb02..5785886240 100644 --- a/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs +++ b/Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs @@ -826,7 +826,7 @@ out ParseMorph morph // The LexEntry is a variant form and the (non-zero) index indicates // which set of LexEntryRefs it is for. ICmObject objForm; - if ( + if (String.IsNullOrEmpty(formHvo) || !cache.ServiceLocator .GetInstance() .TryGetObject(int.Parse(formHvo), out objForm)