From 5aa790d0a3b24cfc452066260104c9cca2e83be4 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 20 Sep 2009 23:13:03 +0200 Subject: [PATCH] jscript: Check for arg_array being NULL (Coverity). --- dlls/jscript/function.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 1b1b4e70ab0..1f1826b6be3 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -432,7 +432,8 @@ static HRESULT Function_apply(DispatchEx *dispex, LCID lcid, WORD flags, DISPPAR if(V_VT(get_arg(dp,1)) == VT_DISPATCH) { arg_array = iface_to_jsdisp((IUnknown*)V_DISPATCH(get_arg(dp,1))); - if(!is_class(arg_array, JSCLASS_ARRAY) && !is_class(arg_array, JSCLASS_ARGUMENTS)) { + if(arg_array && ( + !is_class(arg_array, JSCLASS_ARRAY) && !is_class(arg_array, JSCLASS_ARGUMENTS) )) { jsdisp_release(arg_array); arg_array = NULL; }