msvideo.dll16: Check if any 16 bit thunks have been allocated before accessing pointer.

Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2017-02-03 09:36:45 +01:00 committed by Alexandre Julliard
parent beab000a53
commit ea7cc6fc55

View file

@ -771,6 +771,9 @@ static struct msvideo_thunk* MSVIDEO_HasThunk(HIC16 hic)
{
struct msvideo_thunk* thunk;
if (!MSVIDEO_Thunks)
return NULL;
for (thunk = MSVIDEO_Thunks; thunk < &MSVIDEO_Thunks[MAX_THUNKS]; thunk++)
{
if (thunk->hIC16 == hic) return thunk;