From 0343a11d1af1e0ac9afe9a7c91dd152991bddf08 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 19 Feb 2007 08:29:08 +0000 Subject: revert error check-in in r11777 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/win32ole.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ext/win32ole') diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index f0fcc11fe0..950ff21fd9 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -79,7 +79,7 @@ #define WC2VSTR(x) ole_wc2vstr((x), TRUE) -#define WIN32OLE_VERSION "0.7.0" +#define WIN32OLE_VERSION "0.7.1" typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX) (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); @@ -921,8 +921,13 @@ ole_variant2val(pvar) VARIANT variant; VALUE val; VALUE val2; + int dim = 0; + + if (!psa) { + return obj; + } + dim = SafeArrayGetDim(psa); - int dim = SafeArrayGetDim(psa); VariantInit(&variant); V_VT(&variant) = (V_VT(pvar) & ~VT_ARRAY) | VT_BYREF; -- cgit v1.2.3