Skip to content

Commit 18046b4

Browse files
committed
fix CodeModule.Clear implementation for VB6 wrapper
1 parent d2b9369 commit 18046b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Rubberduck.VBEEditor/SafeComWrappers/VB6/CodeModule.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ public string Content()
8787

8888
public void Clear()
8989
{
90-
Target.DeleteLines(1, CountOfLines);
90+
if (Target.CountOfLines > 0)
91+
{
92+
Target.DeleteLines(1, CountOfLines);
93+
}
9194
}
9295

9396
/// <summary>

0 commit comments

Comments
 (0)