Skip to content

Commit 5f68129

Browse files
committed
potential fix for #2386
1 parent f84cc65 commit 5f68129

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Rubberduck.VBEEditor/SafeComWrappers/VBA/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
private string _previousContentHash;

0 commit comments

Comments
 (0)