richedit: Check return of GetScrollInfo before accessing the returned structure.

This commit is contained in:
Eric Pouech 2008-01-04 21:12:14 +01:00 committed by Alexandre Julliard
parent f33a27517b
commit cb4f8a80de
1 changed files with 1 additions and 2 deletions

View File

@ -697,8 +697,7 @@ int ME_GetYScrollPos(ME_TextEditor *editor)
SCROLLINFO si;
si.cbSize = sizeof(si);
si.fMask = SIF_POS;
GetScrollInfo(editor->hWnd, SB_VERT, &si);
return si.nPos;
return GetScrollInfo(editor->hWnd, SB_VERT, &si) ? si.nPos : 0;
}
BOOL ME_GetYScrollVisible(ME_TextEditor *editor)