Skip to content

Commit b0bf8a8

Browse files
authored
LT-22525: Handle missing POS in msa and empty form hvo (#903)
Change-Id: I7bab55c0de2a4d0bc5340da8fa8765137518f84d
1 parent dc2572c commit b0bf8a8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Src/Utilities/pcpatrflex/ToneParsFLExDll/ANABuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private string GetAnaProperties(ParseMorph pMorph)
208208
case MoStemMsaTags.kClassId:
209209
var stemMsa = msa as IMoStemMsa;
210210
sb.Append("RootPOS");
211-
sb.Append(stemMsa.PartOfSpeechRA.Hvo);
211+
sb.Append((stemMsa.PartOfSpeechRA != null) ? stemMsa.PartOfSpeechRA.Hvo : 0);
212212
break;
213213
case MoInflAffMsaTags.kClassId:
214214
break;

Src/Utilities/pcpatrflex/ToneParsFLExDll/ToneParsInvoker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ out ParseMorph morph
826826
// The LexEntry is a variant form and the (non-zero) index indicates
827827
// which set of LexEntryRefs it is for.
828828
ICmObject objForm;
829-
if (
829+
if (String.IsNullOrEmpty(formHvo) ||
830830
!cache.ServiceLocator
831831
.GetInstance<ICmObjectRepository>()
832832
.TryGetObject(int.Parse(formHvo), out objForm)

0 commit comments

Comments
 (0)