[4/8] wbemprox: Set correct variant type if array property value is NULL.

Hans Leidekker hans at codeweavers.com
Wed Dec 23 04:07:39 CST 2015


Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
 dlls/wbemprox/query.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c
index 7fedf89..53e1044 100644
--- a/dlls/wbemprox/query.c
+++ b/dlls/wbemprox/query.c
@@ -841,7 +841,8 @@ HRESULT get_propval( const struct view *view, UINT index, const WCHAR *name, VAR
         CIMTYPE basetype = view->table->columns[column].type & CIM_TYPE_MASK;
 
         val_ptr = to_safearray( (const struct array *)(INT_PTR)val, basetype );
-        if (!vartype) vartype = to_vartype( basetype ) | VT_ARRAY;
+        if (!val_ptr) vartype = VT_NULL;
+        else if (!vartype) vartype = to_vartype( basetype ) | VT_ARRAY;
         goto done;
     }
     switch (view->table->columns[column].type & COL_TYPE_MASK)
-- 
2.1.4




More information about the wine-patches mailing list