Commit cb4f8a80 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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

parent f33a2751
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment