summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
diff options
context:
space:
mode:
authorGrant Gayed <grant_gayed@ca.ibm.com>2012-09-06 05:50:37 -0400
committerGrant Gayed <grant_gayed@ca.ibm.com>2012-09-06 05:51:15 -0400
commit001a26d56e2c5f6288db0d3f1cb8c5f85fea05dc (patch)
tree2b5c32b677eaf12d431feb75c07e08c1d9d3d292 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
parent5f9227865b107d4c75700ae0f3a291ce497e659a (diff)
downloadeclipse.platform.swt-001a26d56e2c5f6288db0d3f1cb8c5f85fea05dc.tar.gz
eclipse.platform.swt-001a26d56e2c5f6288db0d3f1cb8c5f85fea05dc.tar.xz
eclipse.platform.swt-001a26d56e2c5f6288db0d3f1cb8c5f85fea05dc.zip
Bug 381407 - reproducible crash in Debug's Variables view (ppc64)
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 3aca800842..58ea05420f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -519,12 +519,12 @@ void createColumn (TableColumn column, int index) {
TableItem item = items [i];
if (item != null) {
int /*long*/ oldItem = item.handle;
- /* the first three columns contain int values, subsequent columns contain pointers */
- for (int j=0; j<3; j++) {
+ /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+ for (int j=0; j<FOREGROUND_COLUMN; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
}
- for (int j=3; j<modelLength; j++) {
+ for (int j=FOREGROUND_COLUMN; j<modelLength; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
if (types [j] == OS.G_TYPE_STRING ()) {
@@ -962,12 +962,12 @@ void destroyItem (TableColumn column) {
TableItem item = items [i];
if (item != null) {
int /*long*/ oldItem = item.handle;
- /* the first three columns contain int values, subsequent columns contain pointers */
- for (int j=0; j<3; j++) {
+ /* the columns before FOREGROUND_COLUMN contain int values, subsequent columns contain pointers */
+ for (int j=0; j<FOREGROUND_COLUMN; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr1, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr1 [0], -1);
}
- for (int j=3; j<FIRST_COLUMN; j++) {
+ for (int j=FOREGROUND_COLUMN; j<FIRST_COLUMN; j++) {
OS.gtk_tree_model_get (oldModel, oldItem, j, ptr, -1);
OS.gtk_list_store_set (newModel, newItem, j, ptr [0], -1);
if (ptr [0] != 0) {
@@ -1009,11 +1009,11 @@ void destroyItem (TableColumn column) {
if (item != null) {
int /*long*/ iter = item.handle;
int modelIndex = column.modelIndex;
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, 0, -1);
- OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, 0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_PIXBUF, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_TEXT, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FOREGROUND, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_BACKGROUND, (int /*long*/)0, -1);
+ OS.gtk_list_store_set (modelHandle, iter, modelIndex + CELL_FONT, (int /*long*/)0, -1);
Font [] cellFont = item.cellFont;
if (cellFont != null) {