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

Loading…
Cancel
Save