Skip to content

Fix exception when writing resx files without adding any resources - #3418

Merged
siegfriedpammer merged 1 commit into
icsharpcode:masterfrom
jwfx:resx-exception
Mar 8, 2025
Merged

Fix exception when writing resx files without adding any resources#3418
siegfriedpammer merged 1 commit into
icsharpcode:masterfrom
jwfx:resx-exception

Conversation

@jwfx

@jwfx jwfx commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

Problem

Version 9.0.0.7889 throws a NullReferenceException when trying to write a resx file without calling AddResource() due to the uninitialized writer.

Solution

Initialize the writer during Generate, in case it was not initialized yet.

@siegfriedpammer
siegfriedpammer merged commit bada92e into icsharpcode:master Mar 8, 2025
@siegfriedpammer

Copy link
Copy Markdown
Member

Thank you very much!

@jwfx

jwfx commented Mar 8, 2025

Copy link
Copy Markdown
Contributor Author

Thank you very much!

Thanks for the quick reaction time on review and merge, much appreciated. 👍

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.

2 participants