mirror of
https://github.com/reactos/wine.git
synced 2025-02-18 11:58:22 +00:00
richedit: Check return of GetScrollInfo before accessing the returned structure.
This commit is contained in:
parent
f33a27517b
commit
cb4f8a80de
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user