diff options
author | Carolyn MacLeod <carolyn> | 2010-05-12 21:42:11 +0000 |
---|---|---|
committer | Carolyn MacLeod <carolyn> | 2010-05-12 21:42:11 +0000 |
commit | 3b10046201958be86a73feec334ee6ce020bece3 (patch) | |
tree | ff1c9c2a2c334412e0586083de3140c5858ad9e1 /bundles/org.eclipse.swt/Eclipse SWT Accessibility | |
parent | 74bc3bf9e2fa90f65ba4467afaa401244bd32dd3 (diff) | |
download | eclipse.platform.swt-3b10046201958be86a73feec334ee6ce020bece3.tar.gz eclipse.platform.swt-3b10046201958be86a73feec334ee6ce020bece3.tar.xz eclipse.platform.swt-3b10046201958be86a73feec334ee6ce020bece3.zip |
Bug 312722 - Missing AddRef in new Relation
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Accessibility')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java index e933c6a1ee..ae19777c67 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/win32/org/eclipse/swt/accessibility/Relation.java @@ -58,6 +58,7 @@ class Relation { this.accessible = accessible; this.type = type; this.targets = new Accessible[0]; + AddRef(); } int /*long*/ getAddress() { @@ -135,7 +136,7 @@ class Relation { if (targetIndex < 0 || targetIndex >= targets.length) return COM.E_INVALIDARG; Accessible target = targets[targetIndex]; target.AddRef(); - COM.MoveMemory(ppTarget, new int /*long*/[] { target.objIAccessible.getAddress() }, OS.PTR_SIZEOF); + COM.MoveMemory(ppTarget, new int /*long*/[] { target.getAddress() }, OS.PTR_SIZEOF); return COM.S_OK; } @@ -145,7 +146,7 @@ class Relation { for (int i = 0; i < count; i++) { Accessible target = targets[i]; target.AddRef(); - COM.MoveMemory(ppTargets + i * OS.PTR_SIZEOF, new int /*long*/[] { target.objIAccessible.getAddress() }, OS.PTR_SIZEOF); + COM.MoveMemory(ppTargets + i * OS.PTR_SIZEOF, new int /*long*/[] { target.getAddress() }, OS.PTR_SIZEOF); } COM.MoveMemory(pNTargets, new int [] { count }, 4); return COM.S_OK; |