Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2014-09-18 08:25:47 +0000
committerLakshmi Shanmugam2014-09-29 09:42:39 +0000
commite90ab2125687aa309a4ccb3b915236a2c38bbe42 (patch)
tree9628c3101c242b0a421807ed978d55f29cd2e8bd
parentf0fe43dfebf042c56275f08bd4efaa0b5f296ca4 (diff)
downloadeclipse.platform.swt-e90ab2125687aa309a4ccb3b915236a2c38bbe42.tar.gz
eclipse.platform.swt-e90ab2125687aa309a4ccb3b915236a2c38bbe42.tar.xz
eclipse.platform.swt-e90ab2125687aa309a4ccb3b915236a2c38bbe42.zip
Bug 422371 - Eclipse crashes with EXC_BAD_ACCESS (SIGSEGV) inv4507dI20140930-0800
Tree.drawInteriorWithFrame_inView Signed-off-by: Lakshmi Shanmugam <lshanmug@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index ad5c4cfcaa..bbfd033fc3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -980,9 +980,12 @@ void drawInteriorWithFrame_inView (long /*int*/ id, long /*int*/ sel, NSRect rec
NSOutlineView widget = (NSOutlineView)this.view;
long /*int*/ [] outValue = new long /*int*/ [1];
OS.object_getInstanceVariable(id, Display.SWT_ROW, outValue);
+ long /*int*/ rowIndex = widget.rowForItem(new id(outValue [0]));
+ if (rowIndex == -1) {
+ return; // the row item doesn't exist or has been disposed
+ }
TreeItem item = (TreeItem) display.getWidget (outValue [0]);
if (item == null) return;
- long /*int*/ rowIndex = widget.rowForItem(item.handle);
OS.object_getInstanceVariable(id, Display.SWT_COLUMN, outValue);
long /*int*/ tableColumn = outValue[0];
long /*int*/ nsColumnIndex = widget.tableColumns().indexOfObjectIdenticalTo(new id(tableColumn));

Back to the top