aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbhishek Kishore2014-02-26 01:08:10 (EST)
committerGerrit Code Review @ Eclipse.org2014-02-27 05:09:00 (EST)
commitda070c767dca330968a0bc3730f4f7fa6e63ddea (patch)
tree21be0d8fd422abb17979fdfc45b229b31702a83d
parentb7d47688d504dbc36f5825fd6a939d0ae59dce8e (diff)
downloadeclipse.platform.swt-da070c767dca330968a0bc3730f4f7fa6e63ddea.zip
eclipse.platform.swt-da070c767dca330968a0bc3730f4f7fa6e63ddea.tar.gz
eclipse.platform.swt-da070c767dca330968a0bc3730f4f7fa6e63ddea.tar.bz2
Bug 423050 - Eclipse crashes on mac 10.8 when Text..setTextLimit(-1) isrefs/changes/45/22545/2
set Change-Id: Iac225055fb4ac47548c7f7e2b22d8e2798aa874a Signed-off-by: Abhishek Kishore <abhishek.kishore@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
index f4c5273..5f3297e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -2184,6 +2184,7 @@ public void setTextChars (char[] text) {
public void setTextLimit (int limit) {
checkWidget ();
if (limit == 0) error (SWT.ERROR_CANNOT_BE_ZERO);
+ if(limit < 0) return;
textLimit = limit;
}