From a94c25f3ae8e75d88a2553a4a8d414c7c2a9d3d8 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 17 Sep 2009 01:05:10 +0200 Subject: [PATCH] jscript: Fixed debugstr_variant for NULL argument. --- dlls/jscript/jsutils.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index a51518c875..cef141a5e3 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -31,11 +31,14 @@ WINE_DECLARE_DEBUG_CHANNEL(heap); const char *debugstr_variant(const VARIANT *v) { + if(!v) + return "(null)"; + switch(V_VT(v)) { case VT_EMPTY: - return wine_dbg_sprintf("{VT_EMPTY}"); + return "{VT_EMPTY}"; case VT_NULL: - return wine_dbg_sprintf("{VT_NULL}"); + return "{VT_NULL}"; case VT_I4: return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v)); case VT_R8: