CurrentLine = HBufferImage.CurrentLine;\r
Line = HMoveLine (FRow - HBufferImage.BufferPosition.Row);\r
\r
- if (FColumn > Line->Size) {\r
+ if (Line == NULL || FColumn > Line->Size) {\r
HasCharacter = FALSE;\r
}\r
\r
//\r
HBufferImage.BufferPosition.Row = NewFilePosRow;\r
if (RowGap <= 0) {\r
- Abs = -RowGap;\r
+ Abs = (UINTN)ABS(RowGap);\r
HBufferImage.DisplayPosition.Row -= Abs;\r
} else {\r
HBufferImage.DisplayPosition.Row += RowGap;\r
//\r
// if that line, is not that long, so move to the end of that line\r
//\r
- if (FCol > Line->Size) {\r
+ if (Line != NULL && FCol > Line->Size) {\r
FCol = Line->Size + 1;\r
HighBits = TRUE;\r
}\r