OSDN Git Service

特定条件で拡大すると落ちることがあった
[fooeditengine/FooEditEngine.git] / Core / ViewBase.cs
index 18e0219..b3fc675 100644 (file)
@@ -329,6 +329,8 @@ namespace FooEditEngine
             if (row < 0)
                 return true;
             int totalRow = this.LayoutLines.Count - 1 - this.LineCountOnScreen;
+            if (totalRow < 0)
+                totalRow = 0;
             if (row > totalRow)
                 row = totalRow;
             this.Document.Src = new SrcPoint(total.X, row, total.Y);