summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-09 22:41:09 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-09 22:41:09 +0000
commitc8359821a0a4aa50d2bfb9044e2516574002b6f6 (patch)
tree7f75df3589b445b3b5aac9033b60e7e2eeb861d2 /ext
parentffe1735078cdc97893f4a6dabc3d7c86141fc015 (diff)
* ext/win32ole/win32ole.c (ole_variant2val): fix the bug when
SAFEARRAY pointer is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/win32ole.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index f0fcc11..f9064aa 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*);
@@ -922,6 +922,10 @@ ole_variant2val(pvar)
VALUE val;
VALUE val2;
+ if (!psa) {
+ return obj;
+ }
+
int dim = SafeArrayGetDim(psa);
VariantInit(&variant);
V_VT(&variant) = (V_VT(pvar) & ~VT_ARRAY) | VT_BYREF;