vbscript: Fail if we have no context in InvokeEx.

The current code can't cope with it, so do the same thing as in GetDispID,
to prevent a possible crash.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2020-02-13 19:49:52 +01:00 committed by Alexandre Julliard
parent f284d2a5e0
commit b6240570e2
1 changed files with 3 additions and 0 deletions

View File

@ -1388,6 +1388,9 @@ static HRESULT WINAPI ScriptDisp_InvokeEx(IDispatchEx *iface, DISPID id, LCID lc
TRACE("(%p)->(%x %x %x %p %p %p %p)\n", This, id, lcid, wFlags, pdp, pvarRes, pei, pspCaller);
if (!This->ctx)
return E_UNEXPECTED;
if (id & DISPID_FUNCTION_MASK)
{
id &= ~DISPID_FUNCTION_MASK;