Hans Leidekker : wbemprox: Set correct variant type if array property value is NULL.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 23 18:22:07 CST 2015


Module: wine
Branch: master
Commit: 086a1a4ed2cf776c01130c02a13565fff9cbcf8b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=086a1a4ed2cf776c01130c02a13565fff9cbcf8b

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Dec 23 11:07:39 2015 +0100

wbemprox: Set correct variant type if array property value is NULL.

Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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)




More information about the wine-cvs mailing list