Skip to content

Commit bada92e

Browse files
Merge pull request #3418 from jwfx/resx-exception
Fix exception when writing resx files without adding any resources
2 parents 5fab18f + 5d12199 commit bada92e

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)