From 3b10046201958be86a73feec334ee6ce020bece3 Mon Sep 17 00:00:00 2001 From: Carolyn MacLeod Date: Wed, 12 May 2010 21:42:11 +0000 Subject: Bug 312722 - Missing AddRef in new Relation --- .../win32/org/eclipse/swt/accessibility/Relation.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT Accessibility') 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; -- cgit