Bug 142593 - Scrolling a table eventually locks up the entire application (back poort to 3.3.1.1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java index c162d18..fa18d2d 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -5843,22 +5843,6 @@ // if (drawCount != 0 || !OS.IsWindowVisible (handle)) break; NMLVDISPINFO plvfi = new NMLVDISPINFO (); OS.MoveMemory (plvfi, lParam, NMLVDISPINFO.sizeof); - - /* - * When an item is being deleted from a virtual table, do not - * allow the application to provide data for a new item that - * becomes visible until the item has been removed from the - * items array. Because arbitrary application code can run - * during the callback, the items array might be accessed - * in an inconsistent state. Rather than answering the data - * right away, queue a redraw for later. - */ - if ((style & SWT.VIRTUAL) != 0) { - if (ignoreShrink) { - OS.SendMessage (handle, OS.LVM_REDRAWITEMS, plvfi.iItem, plvfi.iItem); - break; - } - } /* * Feature in Windows. When a new table item is inserted @@ -5872,6 +5856,22 @@ if (item == null) break; /* + * When an item is being deleted from a virtual table, do not + * allow the application to provide data for a new item that + * becomes visible until the item has been removed from the + * items array. Because arbitrary application code can run + * during the callback, the items array might be accessed + * in an inconsistent state. Rather than answering the data + * right away, queue a redraw for later. + */ + if ((style & SWT.VIRTUAL) != 0 && !item.cached) { + if (ignoreShrink) { + OS.SendMessage (handle, OS.LVM_REDRAWITEMS, plvfi.iItem, plvfi.iItem); + break; + } + } + + /* * The cached flag is used by both virtual and non-virtual * tables to indicate that Windows has asked at least once * for a table item.