From 47bf80da8cc279c4e4be57f49eaca02a534701ee Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Tue, 24 Oct 2006 13:01:00 +0100 Subject: [PATCH] oleaut32: Fix a crash in dump_DispParms when running the typelib test with debug tracing on. --- dlls/oleaut32/typelib.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 8cf4357de19..0f8f2872340 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -1298,15 +1298,19 @@ static void dump_DispParms(const DISPPARAMS * pdp) TRACE("args=%u named args=%u\n", pdp->cArgs, pdp->cNamedArgs); - if (pdp->cNamedArgs) + if (pdp->cNamedArgs && pdp->rgdispidNamedArgs) + { TRACE("named args:\n"); - for (index = 0; index < pdp->cNamedArgs; index++) - TRACE( "\t0x%x\n", pdp->rgdispidNamedArgs[index] ); + for (index = 0; index < pdp->cNamedArgs; index++) + TRACE( "\t0x%x\n", pdp->rgdispidNamedArgs[index] ); + } - if (pdp->cArgs) + if (pdp->cArgs && pdp->rgvarg) + { TRACE("args:\n"); - for (index = 0; index < pdp->cArgs; index++) - dump_Variant( &pdp->rgvarg[index] ); + for (index = 0; index < pdp->cArgs; index++) + dump_Variant( &pdp->rgvarg[index] ); + } } static void dump_TypeInfo(const ITypeInfoImpl * pty)