Skip to content

Commit 5d12199

Browse files
committed
Fix exception when writing resx files without adding any resources
1 parent 5fab18f commit 5d12199

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ICSharpCode.Decompiler/Util/ResXResourceWriter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ public virtual void Dispose()
312312

313313
public void Generate()
314314
{
315+
if (writer == null)
316+
InitWriter();
317+
315318
if (written)
316319
throw new InvalidOperationException("The resource is already generated.");
317320

0 commit comments

Comments
 (0)