summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/win32ole/win32ole.c')
-rw-r--r--ext/win32ole/win32ole.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index ce28a8472b..9a55708498 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -920,12 +920,13 @@ ole_variant2val(pvar)
VARIANT variant;
VALUE val;
VALUE val2;
- int dim = SafeArrayGetDim(psa);
+ int dim = 0;
if (!psa) {
return obj;
}
+ dim = SafeArrayGetDim(psa);
VariantInit(&variant);
V_VT(&variant) = (V_VT(pvar) & ~VT_ARRAY) | VT_BYREF;