Skip to content

Fix NRE in XLiffBody.AddTransUnit when tu.Source is null#153

Draft
imnasnainaec wants to merge 3 commits into
masterfrom
fix/149-nre-addtransunit
Draft

Fix NRE in XLiffBody.AddTransUnit when tu.Source is null#153
imnasnainaec wants to merge 3 commits into
masterfrom
fix/149-nre-addtransunit

Conversation

@imnasnainaec

@imnasnainaec imnasnainaec commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds null guard on tu.Source in AddTransUnit so a null Source doesn't throw when Target is also null
  • Adds null guard on tu.Source in the NumberTranslated property for the same case

Closes #149

Devin review: https://app.devin.ai/review/sillsdev/l10nsharp/pull/153


This change is Reviewable

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Test Results

    7 files  ±0  104 suites  ±0   36s ⏱️ +13s
167 tests +1  162 ✔️ +1    5 💤 ±0  0 ±0 
634 runs  +4  619 ✔️ +4  15 💤 ±0  0 ±0 

Results for commit 1f9ff82. ± Comparison against base commit 7c4190e.

♻️ This comment has been updated with latest results.

@imnasnainaec imnasnainaec self-assigned this Jun 8, 2026
@imnasnainaec imnasnainaec marked this pull request as draft June 8, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

XLiffBody.AddTransUnit throws NRE when Source is null

1 participant