diff options
author | Victor Rubezhny | 2015-05-14 12:44:48 +0000 |
---|---|---|
committer | Sarika Sinha | 2017-02-06 08:57:41 +0000 |
commit | 1c9b0619e4eebbc94b0f633e8590060de1c82ba0 (patch) | |
tree | 0ab450b10b7166b748e0efd309ef6e17d95574e7 | |
parent | ab220976ddfb22a8b3230f3598f6dc0a2baac501 (diff) | |
download | eclipse.platform.debug-1c9b0619e4eebbc94b0f633e8590060de1c82ba0.tar.gz eclipse.platform.debug-1c9b0619e4eebbc94b0f633e8590060de1c82ba0.tar.xz eclipse.platform.debug-1c9b0619e4eebbc94b0f633e8590060de1c82ba0.zip |
Bug 467326 - NullPointerException in IOConsolePartition.delete (85)Y20170209-1000I20170212-2000I20170211-2000I20170210-2000I20170210-0615I20170210-0600I20170210-0550I20170210-0530I20170209-2000I20170208-2000I20170208-0700I20170207-2000I20170206-2000
The possible attempt to delete from read-only partition is fixed
Change-Id: Id1a63ba5ef1cf74f3a594ba67e99f93cb59ea7cb
Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java index b02fe4f57..b18f518ba 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2016 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 @@ -377,7 +377,7 @@ public class IOConsolePartitioner implements IConsoleDocumentPartitioner, IDocum if (amountDeleted > 0) { int offset = event.fOffset; IOConsolePartition partition = (IOConsolePartition) getPartition(offset); - if(partition == lastPartition) { + if (partition == lastPartition && IOConsolePartition.INPUT_PARTITION_TYPE.equals(partition.getType())) { partition.delete(event.fOffset-partition.getOffset(), amountDeleted); } } |