Browse Source

Fix exception when writing resx files without adding any resources

pull/3418/head
jwfx 2 months ago
parent
commit
5d1219950f
  1. 3
      ICSharpCode.Decompiler/Util/ResXResourceWriter.cs

3
ICSharpCode.Decompiler/Util/ResXResourceWriter.cs

@ -312,6 +312,9 @@ namespace ICSharpCode.Decompiler.Util
public void Generate() public void Generate()
{ {
if (writer == null)
InitWriter();
if (written) if (written)
throw new InvalidOperationException("The resource is already generated."); throw new InvalidOperationException("The resource is already generated.");

Loading…
Cancel
Save