Skip to content

Commit 222730b

Browse files
committed
Fix incorrect check of IntPtr.Zero and check oInst as the xml-docs said to do...
1 parent 2fa14f9 commit 222730b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Rubberduck.VBEEditor/ComManagement/TypeLibs/Utility/VarDescExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static bool IsValidVBAConstant(this VARDESC varDesc)
3232

3333
return (varDesc.memid & _ourConstantsDispatchMemberIDRangeBitmaskCheck) >= _ourConstantsDispatchMemberIDRangeStart
3434
&& varDesc.varkind == VARKIND.VAR_STATIC
35-
&& varDesc.desc.lpvarValue != IntPtr.Zero;
35+
&& varDesc.desc.oInst != 0;
3636
}
3737
}
3838
}

0 commit comments

Comments
 (0)